+ 1

How to find area and perimeter of rectangle using JavaScript

finding area and perimeter of rectangle

3rd Feb 2019, 7:30 AM
Divesh Chauhan
Divesh Chauhan - avatar
1 Answer
+ 7
Just plug in formula. var length = prompt("Enter length", 5); var width = prompt("Enter width", 10); alert("Area:"+length*width); alert("Perimeter:"+(2*(length+width)));
3rd Feb 2019, 7:44 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar