Javascript program computer science homework help

Write a simple HTML/Javascript program which is capable of computing the area of a rectangle as follows:


Get Your Custom Essay Written From Scratch
We have worked on a similar problem. If you need help click order now button and submit your assignment instructions.
Just from $13/Page
Place an Order

 On the HTML page, display:

  Two “input” fields where a human can enter a number/value

Get Assignment Writing Help

Our experts are ready to complete your assignment, course work. essay, test, dissertation, research paper, quiz

Get Started

  One field should be labeled on the screen as “Length

  One field should be labeled on the screen as “Width

  button labeled “Calculate Area“.  Clicking this button should:

  Calculate and Display the area value of the shape in an “Alert Box”utilizing the user-provided values in the input fields.

  Additionally, if the Length and Width are equal, an “alert box” should display “Hey, that’s just a square!“.

  In a separate Javascript file

  Create a function called getShapeArera which:

  Performs the appropriate calculation and updates the page as described above.

(This is the function that should be called when when the user clicks the ”
Calculate Area” button described above.)


Usually, lines of textual data must be properly aligned on a screen or page for easy viewing, Write a JavaScript function called stringPad(str, padChar)that accepts three parameters as follows:

·  An arbitrary string (like a name, for example)

·  A string to be used as a “padding character” to fill in extra space (see the example)

·  The total length of the new string (see example)

The function should return a new string

·  With an LOWER-cased version of str following the “pad characters”

·  Such that the total length of the new string is equal to the new provided

·  If the desired “total length” is less than the length of the input string, then just the input string is returned.

For example:

A call to stringPad(“Hello”, “*”, 10) would return:  *****hello

A call to stringPad(“xYZ“, “-“, 5) would return: –xyz

A call to stringPad(“AbCDe”, “#”, 2) would return: abcde

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Order Over WhatsApp Place an Order Online

"Do you have an upcoming essay or assignment due?

Get any topic done in as little as 6 hours

If yes Order Similar Paper

All of our assignments are originally produced, unique, and free of plagiarism.

Stuck with a Question?

Get it solved from our top experts within 8 hrs!

Ask Your Question Now!

"Are you looking for a similar assignment? if yes, we are ready to help"

Order New Solution

You will get 100% plagiarism free and professional written paper.