Skip to content

Commit e7a4817

Browse files
I fixed the expected output value to be a number not a string by converting the string from tofix() back to a number by using Numbe
1 parent eaa7a5d commit e7a4817

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
@@ -16,7 +16,7 @@
1616

1717
function calculateBMI(weight, height) {
1818
let BMI = weight / (height ** 2);
19-
return BMI.toFixed(1);
19+
return Number(BMI.toFixed(1));
2020
}
2121

2222
console.log(calculateBMI(80, 1.7));

0 commit comments

Comments
 (0)