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, quizGet Started
One field should be labeled on the screen as “Length“
One field should be labeled on the screen as “Width“
A 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!“.
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.)
Â· 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.
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
Stuck with a Question?
Get it solved from our top experts within 8 hrs!Ask Your Question Now!