Skip to content

Commit 9d960f0

Browse files
author
Arthur
committed
sprint 3/1
1 parent 543d643 commit 9d960f0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616

1717
function calculateBMI(weight, height) {
1818
// return the BMI of someone based off their weight and height
19-
}
19+
20+
21+
let newheight = height / 100;
22+
let num = weight / (newheight ** 2);
23+
let result = num.toFixed(1);
24+
25+
return result;
26+
}
27+
28+
29+
console.log(calculateBMI(58, 178));

0 commit comments

Comments
 (0)