JavaScript Area of Square and Triangle calculate
Area of Square and Triangle is easy to create Calculator by Javascript program.
For the Area of the Square calculate
area Square= width*height
For Area of Triangle calculate
area Square= (width*height)/2
<!DOCTYPE html>
<html>
<head>
<title>Area of Square and Triangle</title>
</head>
<body>
<script type="text/javascript">
var width = parseFloat(prompt("Enter Your Shape Base"));
var height = parseFloat(prompt("Enter Your Shape Hight"));
var area_Square=width*height;
var area_Triangle=(width*height)/2;
document.write("Area of Squre is "+area_Square+"<br/>");
document.write("Area of Triangle is "+area_Triangle+"<br/>");
</script>
</body>
</html>