12/3


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

SyntaxError: Unexpected token if

whats wrong in my code?


#2

You seem to lack the {} around your function.


#3

Thank you! I completely missed them. :+1: