Bug in "Introduction to Javascript, Control Flow step 5/9"?

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-javascript/lessons/control-flow/exercises/else-if?action=resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

on step 5/9, Instruction 4 doesn’t want to move along even if I followed it literally, I set moonPhase to “solar eclipse” and hit “Run” and I see “Caution, unknown!” in the console, but the instruction doesn’t move to step 5

```

var moonPhase = ‘solar eclipse’;
if (moonPhase === ‘full’) {
console.log (‘Howwwwlll!!!’);
} 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(‘Caution!’);
}

<do not remove the three backticks above>
1 Like

Guys, I figured it out, I deleted a semicolon on line 1 after (var moonPhase = “solar eclipse”) and hit “Run” and it worked, I think it’s a real bug because a semicolon is necessary there, right ?

2 Likes

Hmm yes, you should have a semi-colon there. But javascript isn’t really that fussy about if you have one or not.

If you want to look into the nuances of it you can read this.

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