Skip to content

Commit 44ba864

Browse files
authored
Fix BMI calculation to round to 1 decimal place
1 parent 2a7e1b4 commit 44ba864

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
19-
}
19+
return Math.round((weight/(height*height)*10))/10;
20+
}

0 commit comments

Comments
 (0)