Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Berkcan alan0053

let adeshsWeight = 90;
let adeshsHeight = 191;

function calculateBMI(weight, height) {
  weight = adeshsWeight;
  height = adeshsHeight;
  let BMI = (height / weight) * 10 + 3.45; //Totally made up formula :D
  //   24.67;
  return Number(BMI.toFixed(2));
}

function interpretBMI(BMI) {
  if (BMI < 18.5) {
    resBMI = `Underweight`;
  } else if (BMI >= 18.5 && BMI < 25) {
    resBMI = `Normal Weight`;
  } else if (BMI >= 25 && BMI < 30) {
    resBMI = `Over Weight`;
  } else {
    resBMI = `Obese`;
  }
  console.log(BMI); // for debug purposes
  return resBMI;
}

console.log(interpretBMI(calculateBMI(adeshsHeight, adeshsWeight)));

Xcode Android Windows

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages