Functions & if / else


Can someone tell me whats wrong with my code ?? All it says is that their's a: SyntaxError: Unexpected token if
// Write your function below.
// Don't forget to call your function!
var sleepCheck = function(numHours)
if(numHours >= 6) {
return "You're getting plenty of sleep! Maybe even too much!";
else {
return "Get some more shut eye!";


general function syntax:

var functionName = function(parameter){
  // do something

the curly brackets are missing in your case


Thank you soo much :slight_smile: it was such a simple mistake