Skip to content

Commit 6def982

Browse files
committed
modified answer of 3-mandatory-implement 1-bmi.js
1 parent 233b1a0 commit 6def982

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717
function calculateBMI(weight, height) {
1818
const rawBMI = weight / (height * height);
19-
const result = Math.floor(rawBMI * 10) / 10;
20-
21-
return result;
19+
return rawBMI.toFixed(1);
2220
}
2321

2422
console.log(calculateBMI(77, 1.83));

0 commit comments

Comments
 (0)