12. Function & if/else


Can someone help me figure out what I'm doing wrong here? I would greatly appreciate it.

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!";



Update: I figured it out I didn't add a extra curly brace at the end.


your function:

var sleepCheck = function(numHours) {

where is the matching closing curly bracket (}) of your function?

edit: you figured it out, never mind :stuck_out_tongue:


thank you but where should i close (}) ?


after your function content? If you can't figure it out, please make a new topics. Topics are for helping the person who made the topic