Correction of code in javascript


#1

ar sleepCheck=function(numHours)
{
if(numHours>=8)
{
return("You're getting plenty of sleep! Maybe even too much!");

}
else
{ return("Get some more shut eye");
}

};
sleepCheck(5);
sleepCheck(10);
sleepCheck(8);
error:It looks like your function doesn't return "Get some more shut eye!" when numHours is 5. Check your if / else syntax and whether you're using the correct comparison operator
https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#


#2

strings returned should be an exact match, you are missing the exclamation mark after eye


#3

yeah, you are right..thanks for the help but codeacademy should not show that type of error for that!!!!right??


#4

i think the error indicates that the string returned isn't an exact match, the course is going to get an upgrade soon, so then this is no longer relevant, the courses are indeed in need of a update


#5