Skip to content

Commit 9c73a1c

Browse files
fix: ensure BMI result is returned as a number
1 parent dab924b commit 9c73a1c

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
@@ -18,6 +18,6 @@ function calculateBMI(weight, height) {
1818
let sqh = height * height;
1919
let bmi = weight / sqh;
2020

21-
return bmi.toFixed(1);
21+
return Number(bmi.toFixed(1));
2222
}
2323
console.log(calculateBMI(20, 1.79));

0 commit comments

Comments
 (0)