12. Functions & if / else code help!


So on '12. Functions & if / else' I keep getting errors, I have re written my code but it still comes up with the same error:

Oops, try again. It looks like sleepCheck() isn't returning "You're getting plenty of sleep! Maybe even too much!" when numHours is 10. Check your if / else syntax and whether you're using the correct comparison operator.

Any help is greatly appreciated.

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


your codition is

if(sleepCheck >= 8)

is it right condition?

sleepCheck(10) means the value in the parenthesis wiil go to numHours.
so i would do
if(numHours >= 8)