Skip to content

Commit 4680d18

Browse files
committed
Applied JS naming conventions (camelCase) and replaced let with const for non-reassigned variables
1 parent f976015 commit 4680d18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18-
let BMI = weight / (height * height);
19-
let rounded = Math.round(BMI * 10) / 10;
20-
return rounded;
18+
const bmi = weight / (height * height);
19+
const roundedBMI = Math.round(bmi * 10) / 10;
20+
return roundedBMI;
2121

2222
}
2323
console.log(calculateBMI(70, 1.73));

0 commit comments

Comments
 (0)