First of above thank you for spare time to read this. I am trying to code
function bmiCalculator (weight, height){
return Math.floor(weight/Math.pow(height,2));
}
var bmi = bmiCalculator;
if (Math.floor <18.5) {
"your bmi" + bmi + "you are skinny";
} else if (bmiCalculator<=10.5 && 24.9 > bmiCalculator){
"your bmi" + bmi + "you are normal";
} else {
"your bmi" + bmi + "you are fat";
}
but i stuck always in getting the direct result which is 15 - by the way i use var weight= 60 and height=2 for variation - Please teach me how to get return with if statements. 2nd question: I need also get if output without using alert,console.log,prompt. Is there a way ?
Aucun commentaire:
Enregistrer un commentaire