12. Function & if/else


I've been sitting and watching it for like an hour and i can't seem to find the mistake. The code:
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!"

The error: "SyntaxError: missing before statement"

I just can't figure it out. Help needed.


from the instructions:

Inside the function, write an if statement

your if and else statement are not inside the function.


which means you shouldn't remove }, you should put it at the right spot, what do you think spot is? What should be part of the function?


Thanks, I got it. I can't believe I was making this silly mistake.


How the heck do I do this? Please help me.



please go here, make a new topic, fill in the template so we can help you