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 543d643 commit 9d960f0Copy full SHA for 9d960f0
1 file changed
Sprint-2/3-mandatory-implement/1-bmi.js
@@ -16,4 +16,14 @@
16
17
function calculateBMI(weight, height) {
18
// return the BMI of someone based off their weight and height
19
-}
+
20
21
+ let newheight = height / 100;
22
+ let num = weight / (newheight ** 2);
23
+ let result = num.toFixed(1);
24
25
+ return result;
26
+}
27
28
29
+console.log(calculateBMI(58, 178));
0 commit comments