What is wrong with my script? help me!



On my console screen it says You're getting plenty of sleep! Maybe even too much! , but when i try to move to the next lesson, 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.

// Write your function below. 
// Don't forget to call your function!
var sleepCheck = function(numHours){
    if(numHours >= 8){
        console.log("You're getting plenty of sleep! Maybe even too much!");
        console.log("Get some more shut eye!");


you should use return, not console.log.


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