forked from M3-Academy/challenge-algorithms-v2.0
feat(challenge-2): completed challenge #2
@ -1,3 +1,6 @@
|
|||||||
export function triangleArea(base, height) {
|
export function triangleArea(base, height) {
|
||||||
// your code here
|
// your code here
|
||||||
}
|
if (!base || !height) return 0;
|
||||||
|
|
||||||
|
return (base * height) / 2;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user