SyntaxError: expected expression, ot keywork "if"


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661

How do I copy and paste what I am working on to show you correctly?

Oops there was a problem with your syntax



#2

The problem is you call

sleepCheck(10)

as part of your function for your code to work close your function and then call sleepCheck.

}
};
sleepCheck(10)

#3

It still didn't work. But I only put in one }. Above, your example is:
}
}:
I did not put one of them in. Also, this is sort of a test, as I pushed the print screen button then pasted it above, so I am curious to see if it will work.


#4

The problem is the return statement in your else branch there shouldn't be a bracket after the string only a semi colon. :slight_smile:


#5

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