12. functions & if else


#1

Here's what my code looks like:

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

and it keeps saying "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." but it's showing up in the console so I don't know what I'm doing wrong!
Thanks in advance.


#2

Hi inside your else statement

return "Get some more shut eye."
Just add a ! and remove the .


#3

oh! lol thank you very much