Functions and if/else statement EDIT CODE


Hi everyone! I am experiencing a "syntax error" message whenever I try to submit this lesson exercise. Could someone please review my code and edit it? I feel that I have been looking at it for too long, so I cannot see my mistakes. Thank you!

// 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!";
return "Get some more shut eye!";

Replace this line with your code.


the condition of if statement should be in brackets:

if (condition)

your brackets are missing


Thank you!
I tried that and I still get the same message, "syntax error."


please post an upadted version of your code


You are also missing a }

You've closed your if/else statement, but not your function. There should be two }'s at the end.