Functions & if / else


#1

I cant understand whats the problem?

// Write your function below.
// Don't forget to call your function!
var sleepChek = function (numHours) {

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

};

sleepChek (10);
sleepChek (5);
sleepChek (8);

Oops, try again. Make sure to define a function named sleepCheck().


#2

@mxsneli,

Have close look

sleepChek

.
.

sleepCheck