I need help again XD what am i doing wrong?


#1


function sleepCheck(numHours) { 
   if (numHours >= 8) ; 
       return "You\'re getting plenty of sleep! Maybe even too much!"};
        
      if  (numHours < 8) {
        return "Get some more shut eye!"};
    sleepCheck(10);
    sleepCheck(5);
    sleepCheck(8);


#2

Check syntax ...

if/else

if (condition) {
   statement1;
} else {
   statement2;
};

#3

What do you mean by statement?


#4

It is only a placeholder :slight_smile:

In you function , for instance, return "Get some more shut eye!" is a statement.


#5

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