Skip to content

Commit fb74158

Browse files
committed
calculateBMI function to use let instead of var for variable declaration
1 parent 7f82d29 commit fb74158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// It should return their Body Mass Index to 1 decimal place
1111

1212
function calculateBMI(weight, height) {
13-
var bmi = (weight / (height * height));
13+
let bmi = (weight / (height * height));
1414
return bmi.toFixed(1);
1515
}
1616
console.log(calculateBMI(70, 1.73));

0 commit comments

Comments
 (0)