export const getBMICategory = (bmi) => { if (bmi== 18.5 bmi < 18.5){return "Underweight"} else if(bmi > 18.5 && bmi < 25) {return "Normal weight"} else if(bmi < 30) {return "Overweight"} else if(bmi == 30 bmi > 30) {return "Obesity"} }
This is the solution of task 125.
Mr_rohit That's a good one!
I'm interested to learn what you think.
Would it help other people learn new skills, or rather diverge them from the learning path and allow them to copy/paste your solution and thus not learn anything useful?
Mr_rohit Thanks for your post, but it's better for all to discuss here only issues and leave trouble of code education to Coderslang heroes
MAmin that was exactly my point. If you didn't have any issues solving task 125 why post about it?
It creates a shortcut for other people who could become tempted to copy/paste your solution instead of writing their own.
test 6 keeps failing here is my code export const getBMICategory = (bmi) => { if (bmi <= 18.5) { return "Underweight"; } else if (bmi > 18.5 && bmi < 25) { return "Normal weight"; } else if (bmi >= 25 && bmi < 30) { return "Overweight"; } else if (bmi > 30) { return "Obesity"; } };
export const getBMICategory = (bmi) => { if (bmi <= 18.5) { return "Underweight"; } else if (bmi > 18.5 && bmi < 25) { return "Normal weight"; } else if (bmi >= 25 && bmi < 30) { return "Overweight"; } else if (bmi > 30) { return "Obesity"; } };
horiyorrmi72
My code gave the desired output but I still got error from the checker.