Problem Understanding This Error and What is Wrong w/ my code


#1


So I'm stuck here: https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#


Here is the error I got: "Oops, try again. There was a problem with your syntax."


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);
sleepCheck(5);
sleepCheck(8);


#2

nest this condition in parentheses,


#3

Wow I never noticed till now but i need parentheses XD


#4

Haha yes, yes you do.


#5

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