Skip to content

Commit d252252

Browse files
committed
coverted return type of function to number in 1-bmi.js file
1 parent 144eb33 commit d252252

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

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

2323
}
2424
console.log (calculateBMI(70, 1.73))
25+
console.log(typeof calculateBMI());

0 commit comments

Comments
 (0)