Js function if/else #12


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


Currently getting SyntaxError: Unexpected token else
not sure where I went wrong....


There is a semi-colon before else that needs to be removed. We never write a semi-colon before else.


Also not only you have mistake on else clause but ,also in if clause which have semicolon in it and remove extra parentheses and curly bracket.


And return needs a + b


And return is supposed to be a + b


Sorry it came out twice, my apologies