JavaScript program to calculate the area of a triangle given its base and height

python tutorials and learn python

Created with Sketch.

JavaScript program to calculate the area of a triangle given its base and height

let base = 10;
let height = 5;
let area = 0.5 * base * height;
console.log("The area of the triangle with base " + base + " and height " + height + " is " + area);

Leave a Reply

Your email address will not be published. Required fields are marked *