Skip to content

Commit 3865600

Browse files
committed
rewrite bmi code
1 parent 812128c commit 3865600

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
function calculateBMI(weight, height) {
1818
const bmi = weight / (height * height);
19-
return bmi.toFixed(1);
20-
// return the BMI of someone based off their weight and height
19+
return Math.round(bmi * 10) / 10;
2120
}
21+
2222
console.log(calculateBMI(75, 1.74));

0 commit comments

Comments
 (0)