SleepCheck (Yes another one)


What did I do wrong? I cant get past this exercise

Error Messages:

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.

But the console did display correctly!

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!";


The exercise wants us to just call the function, without printing it out in the console.

Even though you are correct, that's what the exercise is trying to get us at.


need a space between sleep! and Maybe


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.