From 71b657274463eb03ffd881c62076f1e8c0eef2bf Mon Sep 17 00:00:00 2001 From: Savio Date: Sun, 30 Oct 2022 14:21:30 -0300 Subject: [PATCH] feat(triangleArea): Adicionando o algoritmo que retorna a area de um triangulo. --- 02-triangleArea/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/02-triangleArea/index.js b/02-triangleArea/index.js index 7628fcd..90524e0 100644 --- a/02-triangleArea/index.js +++ b/02-triangleArea/index.js @@ -1,3 +1,4 @@ -export function triangleArea(base, height) { - // your code here -} \ No newline at end of file +export function triangleArea(base, height) { + let area = (base * height) / 2; + return area; +}