We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf13333 commit 33218f8Copy full SHA for 33218f8
Sprint-2/3-mandatory-implement/1-bmi.js
@@ -20,11 +20,12 @@
20
const bmi = weight / (height * height);
21
22
// Round to 1 decimal place and return
23
- return bmi.toFixed(1);
+ return Number(bmi.toFixed(1));
24
}
25
26
// Test cases
27
console.log(calculateBMI(85, 1.54)); // 35.8
28
console.log(calculateBMI(60, 1.65)); // 22.0
29
console.log(calculateBMI(72, 1.80)); // 22.2
30
-// now the function is reusable and correct.
+// now the function is reusable and correct.
31
+console.log(typeof calculateBMI(85, 1.54));
0 commit comments