Error Message: Missing Before Statement?


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!


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)


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


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