12/13


#1

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!";
}
};

console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));

This is my code.
syntax error: unexpected EOF

Please help!


#2

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

add a quote to the end of it.

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


#3

Wow, can't believe i missed that one. Thanks laflare1017


#4

Help me with this.
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!";
}
};
console.log(sleepCheck(10))
console.log(sleepCheck(8))
console.log(sleepCheck(5))

Oops, try again.
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.


#5

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

( ; ) at the end of quote


#6

The syntax seems to be ok probably a typo in the sentence so just copy and paste it from the instructions.


#7

Btw EOF means End Of File so if you get this error it's most likely a not closed something.