Skip to content

Commit 2d292bb

Browse files
committed
update: fix the return type to number
1 parent 9190a03 commit 2d292bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function calculateBMI(weight, height) {
2121
// calculate the BMI
2222
const BMI = weight / heightSquared;
2323
// return the BMI to 1 decimal place
24-
return BMI.toFixed(1);
24+
return parseFloat(BMI.toFixed(1));
2525
}
2626
let weight = 70; // in kg
2727
let height = 1.73; // in meters

0 commit comments

Comments
 (0)