File tree Expand file tree Collapse file tree
Sprint-3/3-mandatory-implement Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515// It should return a string of their Body Mass Index to 1 decimal place
1616
1717function calculateBMI ( weight , height ) {
18- // return the BMI of someone based off their weight and height
19- let squared_height = height * height ;
20- const bmi = weight / squared_height ;
21- return bmi . toFixed ( 1 ) ;
18+ // return the BMI of someone based off their weight and height
19+ let squared_height = height * height ;
20+ const bmi = weight / squared_height ;
21+ return bmi . toFixed ( 1 ) ;
2222}
23- console . log ( `The BMi of the person is ${ calculateBMI ( 70 , 1.73 ) } ` ) ;
24- // The output of the program is 'The BMi of the person is 23.4'.
23+ console . log ( `The BMi of the person is ${ calculateBMI ( 70 , 1.73 ) } ` ) ;
24+ // The output of the program is 'The BMi of the person is 23.4'.
You can’t perform that action at this time.
0 commit comments