12. Function and if/else


#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! Mayby even too much!";
else (numHours < 8)
return "Get some more shut eye!";
};
sleepCheck(10);

It is doing exactly what it should do. Why is it not passing?


#2

else is the default case so it doesn't need a conditon and having one may cause confusion and errors:


Also for this exercise double check the output messages as the author was pretty strict here.

PS: Did you omit the {} for the if/else on purpose and do you know what your doing there? If no you may check the link as well if yes just forget it.


#3

Got it! spelt maybe wrong, whoops. FML