Sleep Debt Calculator

} else if (day === ‘Tuesday’){
^^^^
SyntaxError: Unexpected token else

I am getting the above error but it doesn’t seem off to me what am i missing?

https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-javascript-syntax-part-i/modules/fecp-learn-javascript-syntax-functions/projects/sleep-debt-calculator

const getSleepHours = (day) =>{
  if(day === 'Monday')
    return 5;
} else if (day === 'Tuesday'){
    return 5;
} else if (day === 'Wednesday'){
    return 8;
} else if (day === 'Thursday'){
    return 6;
} else (day === 'Friday'){
    return 10;
};

Missing opening brace.

1 Like

wow…
thanks a bunch man.

1 Like