What am i doing Wrong?


#1


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));

I am getting the 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.".

NOTE: i am getting "You're getting plenty of sleep! Maybe even too much!" printed to console.


#2

string should be an exact match even a space


#3

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