What's wrong with my syntax?


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



Well first off you are missing an } after your return statement. Second, you are missing sleepCheck(5);
sleepCheck(8); in your code.


your function:

var sleepCheck = function(numHours) {

the { to mark the beginning of your function has no matching } to mark the end of your function.


else {
    return "Get some more shut eye!";

the } of else shouldn't have a semi-colon.

and finally, make sure the strings returned are an exact match


Thanks for your help :smile_cat: :smile:


one } is missing. For the else block you have opened { but by mistake you didn't closed it }.


does it work now?




the question was not addressed to you? I replied to minecraftmaster02


Ok my mistake, ignore my reply


Yes, it did help thanks