What's wrong with this code?


#1

sleepCheck = function(numHours) {
    if (numHours>=) {
        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

You don't need a semi colon after the IF and the Else

So it reads like this:

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

If you change the bottom part to this, it shows them all in the console and passes:

console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));

#3

On the semicolon:


also missing a number here:

if (numHours>=) {

on how to format code: