Exercise 12 Wrong Outputs


#1


// 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!";
            }
    
    
    };
console.log(sleepCheck(8));
console.log(sleepCheck(5));
console.log(sleepCheck(10));

I can't understand the error message I get.

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.

Thanks for the help,

Tim Boysen

Solution by @stetim94

`

// 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!";
        }


};

console.log(sleepCheck(8));
console.log(sleepCheck(5));
console.log(sleepCheck(10));

`

#2

strings returned need to be an exact match

recommendation: copy the strings from the instructions

seems you miss an exclamation mark after much for example, might be more issues, just copy paste the string


#3

Thank You. You solved the problem.


#4