Answers for "js bmi calculator"

1

js bmi calculator

// function that caclulates BMI
function bmiCalc(weight, height){

  var bmiResult = weight / Math.pow(height, 2);
  var roundedResult = Math.floor(bmiResult);

  return roundedResult;
}


// sample use
var bmiCalcResult = bmiCalc(65, 1.8);
console.log(bmiCalcResult);
Posted by: Guest on May-11-2021
1

js bmi calculator

// function that caclulates BMI
function bmiCalc(weight, height){

  var bmiResult = weight / Math.pow(height, 2);
  var roundedResult = Math.floor(bmiResult);

  return roundedResult;
}


// sample use
var bmiCalcResult = bmiCalc(65, 1.8);
console.log(bmiCalcResult);
Posted by: Guest on May-11-2021

Code answers related to "js bmi calculator"

Code answers related to "Javascript"

Browse Popular Code Answers by Language