Skip to content

Commit 658658e

Browse files
committed
Returned BMI as a number instead of string
1 parent 029c9bc commit 658658e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sprint-2/3-mandatory-implement/1-bmi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function calculateBmi(weight,height) {
2121

2222
function calculateBMI (weight,height) {
2323

24-
let bmi = weight / (height*height)
24+
const bmi = weight / (height*height)
2525

26-
return bmi.toFixed(1)
26+
return Math.round(bmi * 10) / 10;
2727

2828
}
2929

0 commit comments

Comments
 (0)