Skip to content

Commit f3c3be7

Browse files
committed
Changed name of function calculateBmi and var bmi to camelCase
1 parent 5b3cd1e commit f3c3be7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
// Then when we call this function with the weight and height
1515
// It should return their Body Mass Index to 1 decimal place
1616

17-
function calculateBMI(weight, height) {
17+
function calculateBmi(weight, height) {
1818
// return the BMI of someone based off their weight and height
1919
let squaredHeight = height * height;
20-
let BMI = weight/squaredHeight;
21-
BMI = BMI.toFixed(1);
22-
return Number(BMI);
20+
let bmi = weight/squaredHeight;
21+
bmi = bmi.toFixed(1);
22+
return Number(bmi);
2323
}
2424

25-
console.log(calculateBMI(70, 1.73));
26-
//console.log(calculateBMI(70, 1.73) + 5);
25+
console.log(calculateBmi(70, 1.73));
26+
//console.log(calculateBmi(70, 1.73) + 5);

0 commit comments

Comments
 (0)