Help! No idea what's wrong


#1



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


};

sleepCheck(10);

sleepCheck(5);

sleepCheck(8);



No idea what's wrong. This is, as far as I know, exactly what it asked for.


#2

HI first this line

if numHours >= 8 {

put the if condition inside the ()

if (condition) {

}
else {

}

then here

if numHours >= 8 {
    return "You're getting plenty of sleep! Maybe even too much!";
}; <-- #remove this ;

#3

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