Skip to content

Commit 8de2fab

Browse files
committed
implemented a function that calculates BMI in 1-bmi.js file
1 parent 45e94c7 commit 8de2fab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sprint-2/3-mandatory-implement/1-bmi.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@
1616

1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
19-
}
19+
const bmi = weight/(height*height);
20+
21+
return bmi.toFixed(1);
22+
23+
}
24+
console.log (calculateBMI(70, 1.73))

0 commit comments

Comments
 (0)