Functions & if/else



var sleepCheck = function(numHours){
return "You're getting plenty of sleep!Maybe even too much!";
return "Get some more shut eye!";

i get this below error msg but it prints out the answers right on console:

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.

whats wrong!!


The syntax seems to be ok so it's most likely a typo in the output message copy and paste the messages if can't find it. A first guess would be the missing space between ! and Maybe.


Are you not embarrassed by that typo?

Tut tut. :wink:


:relaxed: psst :wink:


A post was split to a new topic: What is wrong here