forked from M3-Academy/challenge-algorithms-v2.0
7 lines
132 B
JavaScript
7 lines
132 B
JavaScript
export function triangleArea(base, height) {
|
|
// your code here
|
|
if (!base || !height) return 0;
|
|
|
|
return (base * height) / 2;
|
|
}
|