Skip to content

Commit 9b194a5

Browse files
committed
Answering the task
1 parent b0547d6 commit 9b194a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

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

0 commit comments

Comments
 (0)