Hi what's wrong here (Functions if/else statement)


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


Hi Kaouche,

You forgot to open and close your sleepCheck function using curly braces ({}), and I think you need to remove the space between > and = on line 2.

Would you mind giving a link to the exercise this is on, please?


Thanks Zystvan !
(I didn't understand the 2nd part of your question : link ? )


@slibre2 No problem :)

Link; the URL of the exercise; where you type in website addresses, like https://www.codecademy.com. Could you copy that bit into the forum so I can see it please?


Oh yes sorry ! So it is the N° 11 Function . But I found it . I m at the moment in N° 4 of the Game in JS . Very interesting !