There was an error while loading. Please reload this page.
1 parent 2eb14c0 commit aa32f0eCopy full SHA for aa32f0e
1 file changed
Sprint-3/3-mandatory-implement/1-bmi.js
@@ -15,12 +15,10 @@
15
// It should return a string of their Body Mass Index to 1 decimal place
16
17
function calculateBMI(weight, height) {
18
- let result = (weight/(height*height));
19
- result= Number(result.toFixed(1));
+ let result = (weight/(height*height)).toFixed(1);
20
return String(result)
21
22
23
}
24
25
-console.log(calculateBMI(70,1.7))
26
-console.log(calculateBMI(72,1.7))
+console.log(calculateBMI(81, 1.8))
0 commit comments