What am i doing wrong?


#1

// Write your function below.
// Don't forget to call your function!
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);


#2

You are forgetting to use a pair of curly-brackets-{ }
with which you encapsulate the function-body.

var sleepCheck = function(numHours) {
     //FUNCTION-BODY

     //the code you want to be executed

     //End of FUNCTION-BODY
  }