It says "it looks like sleepCheck() isn't returning."


  1. functions & if/else

    it says "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."

see my code below, i dont know whats wrong or maybe i did the console.log wrong?

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 string returned should be an exact match, i recommend to copy it from the instructions. You forgot the exclamation mark after much(!)


Thank you so much! I lost exactly exclamation mark and stuck here since yasterday evening)))


it ain't matter ...
var sleepCheck = function(numHours)
if (numHours >= 8)
return "You're getting plenty of sleep! Maybe even too much!";

return "Get some more shut eyes!";
i have been doing this long but ain't helping me out


A topic should be dedicated to helping the person who created the topic, i can understand that you use the topic to ask your own question, but that you then have exactly the same problem, is kind of frustrating. YOu have shut eyes instead of shut eye, in your else return statement


Thank you good man :smiley: