Sleep check


#1

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!";}
sleepCheck(10);
sleepCheck(5);
sleepCheck(8);
//i keep getting SyntaxError: expected expression, got keyword 'if'
//what am i doing wrong?


#2

Maybe you need a opening bracket after (numHours)?


#3

Hi you need to open a{ } after sleepCheck = function(numHours) ` and and put all your code inside it like that

var sleepCheck=function (numHours) { <== this open 
if (. ....){


}


else {

}
} <== this close it