sleepCheck Function help!


#1

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

plzzzz tell me what is wrong with this it says it has an illegal return statement


Intro to functions js
#2

I see where you're going with this, unfortunately it's just a little bit back-words.

Literally just switch around the "sleepCheck(10)" and the If-Else statement like so.

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);

This is a very simple solution, so don't go kicking yourself or anything! You were on the right track the whole time.