challenge-algorithms-v2.0-g.../02-triangleArea/index.js

7 lines
155 B
JavaScript

export function triangleArea(base, height) {
// your code here
const areaTriangle = (base * height) / 2
return areaTriangle
}
triangleArea(10, 15)