8 lines
176 B
JavaScript
8 lines
176 B
JavaScript
export function triangleArea(base, height) {
|
|
return (base * height) / 2;
|
|
}
|
|
|
|
console.log(triangleArea(3,5));
|
|
console.log(triangleArea(5,5));
|
|
console.log(triangleArea(2,5));
|