📅  最后修改于: 2022-03-11 15:03:52.443000             🧑  作者: Mango
first you should know these details about the triangle(for the area) -
hight (center)
and the base lenght
now, mutiply the height by the base and divide it by '2'
//code
var base = 5
var height = 9
var ans = (base * height) / 2
console.log(ans)