【发布时间】:2021-06-29 23:37:36
【问题描述】:
** ReactJs **
let resultDisplay=""
if(Bmi>=18 || Bmi<=25 )
{resultDisplay= <p>Perfect</p>
}
Problem is right there but I can't figure it out since I new in React
else if(Bmi<18)
resultDisplay=<p>to Thin</p>
``对我来说看起来不错,任何指导和帮助都会很棒```
else if(Bmi>25)
resultDisplay=<p>Overweight</p>
setresult(resultDisplay)
}
Right now its only working on one condition and doesn't rendering the other conditions results
【问题讨论】:
标签: reactjs function if-statement return