12. Function if/Else


// Write your function below. 
// Don't forget to call your function!

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



I keep getting the error "Oops, try again. There was a problem with your syntax."
I'm not sure what the error is. Can someone please help?


You are missing curly braces around the code block that executes when you call your sleepCheck function.


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