Code issues: Introductions to functions in JS - Functions & if / else - lesson 12


#1

Unable to figure out what the issue with my code is here, I have also checked to see if what issues others have had with this exercise. Thankful for help.

SyntaxError: Unexpected end of input

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

sleepCheck(10);
sleepCheck(5);
sleepCheck(8);

#2

I have also called "sleepCheck()" just once, with 10 as input. So the multiple calls is not he issue.


#3

this line:

return "You're getting plenty of sleep! Maybe even too much!;

a quotation mark (") is missing to mark the end of the string.


#4

Thanks.

One seriously gets code-blind sometimes.
Debugging is one ■■■■ of a task.


#5

#6

yes, debugging is a separate skill