Skip to content

Commit cbefa8c

Browse files
committed
Make sure it returns a number
1 parent 9e4433a commit cbefa8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18-
return (Number(weight) / Number(height) ** 2).toFixed(1);
18+
return Number((Number(weight) / Number(height) ** 2).toFixed(1));
1919
}
2020

21-
console.log(calculateBMI("12", "aad"));
21+
console.log(calculateBMI("12", "12"));

0 commit comments

Comments
 (0)