var Jay={ weight:80.5, height:1.75, BMI:function(){ var bmi=this.weight/(this.height*this.height) return bmi } } if(Jay.BMI()<18.5)alert("too light") else if(Jay.BMI()>=18.5 && Jay.BMI()<25)alert("Congratulation, you are normal size.") else if(Jay.BMI()>=25 && Jay.BMI()<28)alert("too heavy") else if(Jay.BMI()>=28 && Jay.BMI()<32)alert("fat") else alert("Obesity serious")
Sign in to make a reply
Jay枫若情