Lesson 12


#1


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


I get the error but have i done wrong. //SyntaxError: Syntax error


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

else{
    return "Get some more shut eye!";
}
};
console.log(sleepCheck(10));
console.log(sleepCheck(5));
console.log(sleepCheck(8));


#2

your if opening curly bracket:

if (numHours >= 8){ // this one

doesn't have a matching closing curly bracket (})


#3

ha ha! I am so blind , thanks it worked