12. Function & if/else


#1


What is the error please help?

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


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.


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(5);
sleepCheck(8);


#2

The space between too and much is causing the error..

Copy and paste this in: "You're getting plenty of sleep! Maybe even too much!";


#3

ok wait.....
thanks solved it.


#4