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 f45625e commit d8f561bCopy full SHA for d8f561b
Sprint-2/3-mandatory-implement/1-bmi.js
@@ -15,17 +15,5 @@
15
// It should return their Body Mass Index to 1 decimal place
16
17
function calculateBMI(weight, height) {
18
- // squaring your height: 1.73 x 1.73 = 2.99
19
- let heightSquared = height * height;
20
- // dividing 70 by 2.99 = 23.41
21
- let weightMod = weight / heightSquared;
22
- // Your result will be displayed to 1 decimal place, for example 23.4.
23
- let BMI = weightMod.toFixed(1);
24
// return the BMI of someone based off their weight and height
25
- return BMI;
26
}
27
-
28
-let myWeight = 70;
29
-let myHeight = 1.73;
30
31
-console.log(`my BMI is ${calculateBMI(myWeight, myHeight)}`);
0 commit comments