Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var weight, height, measure, bmi, error ;

function calculate() {
weight = document.getElementById("weight").value;
height = document.getElementById("height").value;
Expand All @@ -10,13 +9,13 @@ function calculate() {
bmi = bmi.toFixed(1);

if (bmi <= 18.4) {
measure = "Your BMI is " + bmi + " which means " + "you are Underweight";
measure = "Your BMI is " + bmi + " which means " + "you are Underweight increase your weight ";
} else if (bmi >= 18.5 && bmi <= 24.9) {
measure = "Your BMI is " + bmi + " which means " + "You are Normal";
measure = "Your BMI is " + bmi + " which means " + "You are Normal and healthy";
} else if (bmi >= 25 && bmi <= 29.9) {
measure = "Your BMI is " + bmi + " which means " + "You are Overweight";
measure = "Your BMI is " + bmi + " which means " + "You are Overweight need to lose weight";
} else if (bmi >= 30) {
measure = "Your BMI is " + bmi + " which means " + "You are Obese";
measure = "Your BMI is " + bmi + " which means " + "You are Obese need to lose weight";
}


Expand Down