Syntax error on JS functions lesson 12


Help! Can anyone please tell me what I did wrong? It keeps saying that "SyntaxError: Unexpected identifier"

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



Wrap this condition in parentheses,


Oh I also noticed "var sleepcheck" should be "var sleepCheck", works fine after correction! Thank you so much!


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