Skip to content

Commit 486e599

Browse files
committed
practicing
1 parent 2feb2bf commit 486e599

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
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) { const bmi= weight/(height*height); return parseFloat(bmi.toFixed(1));}
17+
function calculateBMI(weight, height) {
18+
const bmi= weight/(height*height);
19+
return bmi.toFixed(1);
20+
}
1821

1922

2023
console.log(calculateBMI(58,1.50)); // output: 25.8

0 commit comments

Comments
 (0)