Syntax error. 12. Functions & if/else


#1


Hello, I can't understand where I made syntax mistake. Thanks in advance
// Write your function below. 
// Don't forget to call your function!
var sleepCheck = function(numHours){ 
if (numHours >= 8){
return "You are getting plenty of sleep! Maybe even too much!";
}
else{
return "Get some more shut eye!";
}
};
sleepCheck(5)


#2

Your code was pretty good. The reason it didn't work is because you are supposed to call sleepCheck so that it says "You are getting plenty of sleep! Maybe even too much!". You need to log more more than 8 hours. Like, sleepCheck(10)


#3

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