Functions & if/else


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

This is my code but it keeps saying that there is a problem with my syntax


There is one open curly bracket for the function definition, and one that closes it. That means the function definition ends here.
I think you meant to close the if clause, but forgot to open it.


I don't understand.. Where does it go??


Put one curly bracket after if (numHours >= 8)


im have the same problem with my code is it a bug or something? if there is really something wrong with my code can you let me know.


if(numHours >= 8) ; // remove ; and add {

now you have to close the function after closing else statement


 if( condition){

  //comment  somthing

   //somthing else


I Really Thank you from the bottom of my heart.