[solved]Codeacademy says I made a mistake but the console output seems okay?


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#


In this exercise it askes you to call the function with 10,8 and 5 hours of sleep. However when enter my code it gives this error message: 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){
        return "You're getting plenty of sleep! Maybe even too                    much!";
    }
    else{
        return "Get some more shut eye!";
    }
}

sleepCheck(10);
sleepCheck(8);
sleepCheck(5);


#2

Guys I already found my mistake so you can ignore this post :wink:


#3