Else if problem (control flow, werewolf)


Hi! I hope someone can explain what I am doing wrong here?

btw the lesson says it’s finished, but the code never worked?

here’s the code

let moonPhase = 'full';
if (moonPhase === 'full') {
} else if (moonPhase === 'mostly full'); {
  console.log('Arms and legs are getting hairier'); 
} else if (moonPhase === 'mostly new'); {
  console.log('Back on two feet'); 
} else {
  console.log('I swear I am not a werewolf.');

link to lesson:


having too many semi-colons isn’t good. for example here:

else if (moonPhase === 'mostly full');

the semi-colon will interrupt the else if clause.


Thank you for a fast answer!
And I just realised that by myself as well, 5 seconds after i posted! :sweat_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.