sleepCheck () function can't understand help me


#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!”;
}

};

sleepCheck(5);

it show me answer but also gives this 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.

i can’t understand help me.


#2

the strings returned should be an exact match, copy paste them from the instructions


#3

Did you ever figure it out?


#4

that is not how it works, if you have a question you can make a new (linked) topic, include:

code
error message
exercise url
question

so we can help you


#5

missing an ! point after the word much. Everything else is looks excellent.


#7

Same thing happens to me. It returns the correct line of text but says “error. 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.”

??

did you ever get the answer for this?


#8

is something about this:

unclear? Please tell me so i can improve it for next time


#9

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