12. Functions & If/else


#1

var sleepCheck = function(numHours)
{
if (numHours >= 8)
{
return "You're getting plenty of sleep! May be even too much!";
}
else
{
return"Get some more shut eye";
}
};

sleepCheck(10);

Hello everyone,
this is giving me an error - "Oops, try again. It looks like sleepCheck() isn't returning "You're getting plenty of sleep! Maybe even too much!" when numHours is 10. Check your if / else syntax and whether you're using the correct comparison operator."
can anyone tell me what I doing wrong.


#2

The syntax seems to be fine but you seem to have a typo in it:

"Maybe" instead of "May be"


#3

Hey there!
Thank you! That worked!