Intro to functions #12


This seems correct to me, but the output keeps saying SyntaxError: expected expression, got keyword 'else'
here is 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!";

Thank you, and any help is very valuable.


your if statement is missing a {, here is what i mean:

if (condition){ /* you miss {  */

your function is missing a closing curly bracket (}) and semi-colon after your else statement, you are missing semi-colons after console.log. I think that was all