Functions & If\Else Help! Logic seems fine


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.

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



Make sure your strings are exact match to those given in the instructions. There seems to be some extra white space in the first one.


Thank you mtf. By copying and pasting the exact string from the instructions resolve me issue. I was trying to keep everything lined up but didn't realize white space causes issues. Thank again.