Skip to content

Commit 4bc9f9f

Browse files
committed
fix better implementation for bmi calc
1 parent 7ea52ff commit 4bc9f9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
19-
const bmi = Math.round((weight / (height * height)) * 10) / 10;
19+
const bmi = Number((weight / (height * height)).toFixed(1));
2020

2121
return bmi;
2222
}

0 commit comments

Comments
 (0)