Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active January 18, 2022 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/4c56665aabfb976c2e158dc301bb1caa to your computer and use it in GitHub Desktop.
Save McLarenCollege/4c56665aabfb976c2e158dc301bb1caa to your computer and use it in GitHub Desktop.
BMI Calculator
/*
Write function bmi that takes two parameters , the weight and the height and calculates body mass index bmi.
bmi is calculate as (weight divided by square of height)
Note: Don't use Math.pow() to calculate square.
if bmi <= 18.5 return "Underweight"
if bmi <= 25.0 return "Normal"
if bmi <= 30.0 return "Overweight"
if bmi > 30 return "Obese"
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment