Lesson 12 unexpected else token


I've put the code as well as the image of my screen.

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

I am rather confused. please help someone.


Just delete semi-colons after curly brackets on lines 6 and 9.


The semicolon ends your logic, remove it and it should work fine.


thank you that worked.