Syntax error?


#1

var sleepCheck = function(numHours) {
if(numHours > 8) {
return "You're getting plenty of sleep! Maybe even too much!";
}

else(numHours < 8) {
return "Get some more shut eye!";
}

}

sleepCheck(10);

Someone tell me how my syntax is incorrect. It says "expected ';'".


#2

@nomaskanon I suggest trying to put a ";" after every "}" and see if that fixes the issue.


#3

Else doesn't need a condition as it is the default case.