Skip to content

Commit 63fd040

Browse files
committed
Refactor 3-mandatory-implement/1-bmi.js
1 parent 9c7b02e commit 63fd040

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
1919
const heightSquared = Number((height * height).toFixed(2));
20-
const bmi = Number(weight / heightSquared).toFixed(1);
21-
return bmi;
20+
return (weight / heightSquared).toFixed(1);
2221
}
2322

2423
console.log(calculateBMI(70, 1.73));

0 commit comments

Comments
 (0)