Skip to content

Commit 4eb2cc6

Browse files
committed
BMI task completed
1 parent e6d47e5 commit 4eb2cc6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
// It should return a string of their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18+
bmi = weight / (height * height)
19+
return bmi.toFixed(1)
1820
// return the BMI of someone based off their weight and height
1921
}
22+
console.log(`Your BMI is ${calculateBMI(100, 1.62)}`)

0 commit comments

Comments
 (0)