首先,谢谢您的空闲时间阅读本文。我正在尝试编码
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 ?