Function & if/else


#1


Hi, i can't seem to solve this part. Whenever i submit it, it shows this
"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." What's the matter with it ?


Replace this line with your code. 
var sleepCheck = function (numHours) {
if (sleepCheck >= 8)
{return "You're getting plenty of sleep!Maybe even too much!";}
else 
{return "Get some more shut eye!";}}
;
sleepCheck(5);
sleepCheck(8);
sleepCheck(10);


#2

the string returned should be an exact match, copy it from the instructions.

for example a space between ! and Maybe is missing


#3

Tried, but it still doesn't work.


#4

after doing what @stetim94 said do this too

if (sleepCheck >= 8)

sleepCheck is a function name.you should check with numHours

if(numHours >= 8)


#5

Thank you so much for your Help !!!! :smiley:


#6