To see the website in action: https://laurare.github.io/bmi_challenge/src/
Goal: write a JavaScript program that calculates an individual`s BMI index with metric and imperial methods.
Body mass index (BMI) is a simple tool that is generally used to estimate the total amount of body fat.
-
METRIC METHOD
The metric formula accepts height measurements in meters and weight in kilograms. If you know your height in centimeters only, simply divide the number of centimeters by 100 convert it to meters.
1.Multiply your height by itself.
2.Divide your weight in kilograms by the value calculated in step 1.
3.The resulting number is your BMI value. -
IMPERIAL METHOD
The imperial formula accepts height measurements in inches and weight in pounds.
1.Multiply your weight in pounds by 703.
2.Multiply your height in inches by itself.
3.Divide the figure from step 1 by the figure in step 2. The resulting number is your BMI value.
Compare the BMI value obtained with the weight statuses below to get the corresponding category:
BMI WEIGHT STATUS CATEGORIES
Below 18.5 : Underweight
18.5 - 24.9 : Healthy
25 - 29.9 : Overweight
Over 30.0 : Obese