Error Message: Missing Before Statement?


#1


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


I can't seem to find the error in my code. I'm working on Functions with an if/else statement. I keep getting a "missing before statement" error. Help is much appreciated!


Code: 

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)


#2

Sorry guys, figured out the problem. Had a colon instead of a semi-colon.


#3

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