Question: Write a program that prompts the user using JavaScript prompt() e for the width and height of a rectangle and then displays the area, and

Write a program that prompts the user using JavaScript prompt() e for the width and height of a rectangle and then displays the area, and the perimeter. Below is an example of using prompt(): let name = prompt("Enter your name:"); The prompt() function returns a string value, even if you enter a number, so you will need to convert the string input value using parseFloat() e. You will use the and getPerimeter() functions from letter-2.js. Create a new function getArea(width, height) that returns the rectangle area. Create a new function displayOutput(width, height) that displays the required output using console.log(). Output specification: width = 3 height = 4 area = 12 perimeter = 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
