Skip to content

Commit 2803234

Browse files
committed
complete code
1 parent 9c51754 commit 2803234

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// Then when we call this function with the weight and height
1515
// It should return their Body Mass Index to 1 decimal place
1616

17-
function calculateBMI(weight, height) {
18-
// return the BMI of someone based off their weight and height
19-
}
17+
function calculateBMI(weight, height) { const bmi= weight/(height*height); return parseFloat(bmi.toFixed(1));}
18+
19+
20+
console.log(calculateBMI(58,1.50)); // output: 25.8

0 commit comments

Comments
 (0)