Oops message but the end result its okay


#1

<// Write your function below.
// Don't forget to call your function!
var sleepCheck = function (numHours){
return numHours >=8;
};

if (sleepCheck(12)){
console.log("You're getting plenty of sleep! Maybe even too much!");
} else {
console.log("Get some more shut eye!");
};

the code above is working just fine, but i get this Oops message: Check your if / else syntax and whether you're using the correct comparison operator.
Can you tell me where I am wrong!???
Thanks a lot,

bye


#2

step 1 is good:

var sleepCheck = function (numHours){

};

then step 2:

Inside the function, write an if statement

okay, so if we want to do this:

var sleepCheck = function (numHours){
   if (condition){
     // return something
  }
};

now build from from here, hope this helps


#3

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