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 4d2946e commit 976687dCopy full SHA for 976687d
Sprint-2/3-mandatory-implement/1-bmi.js
@@ -17,9 +17,14 @@
17
function calculateBMI(weight, height) {
18
19
const bmi = weight/(height*height);
20
- return bmi.toFixed(1);
+ return Number(bmi.toFixed(1));
21
22
// return the BMI of someone based on their weight and height
23
}
24
25
-console.log("The BMI is",calculateBMI(70, 1.73));
+console.log("The BMI is",calculateBMI(70, 1.73));
26
+console.log(typeof calculateBMI(70,1.73));
27
+
28
+// Thank you. As I see it n the console it looks like a number when actually it is a number,
29
+// the code has been updated to return a number as -----return Number(bmi.toFixed(1));
30
+// changing the string into number.
0 commit comments