Lesson 12 Functions and if/else


#1



https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/4?curriculum_id=506324b3a7dffd00020bf661#


SyntaxError: Unexpected token


var sleepCheck = function(numHours);
if ( sleepCheck >= 8) {
    return "You're getting plenty of sleep! Maybe even too much!";
else {
    return "Get some more shut eye!";
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));


#2

you closed the function straight away with the ;

remove that add an opening brace {

add another closing brace } before your console.log statements