Else if error( Did you write an else statement that logs 'Invalid moon phase'?)


My code:

let moonPhase=“nofull”;
else if(moonPhase===“mostly full”)
console.log(“Arms and legs are getting hairier”);
else if(moonPhase===“mostly new”)
console.log(“Back on two feet”);
console.log(“Invalid moon phase”);

any help???


Yes, link to the exercise please.

We need to be able to see what’s precisely being asked.




When copy/pasting your code, the quotation marks that you use don’t recognize the strings.

Yours appear like this: “ Howl! ”
When they should appear like this: " Howl! "

Once I changed that everything worked fine. What kind of keyboard are you using (country)?

Edit: My bad, it doesn’t work fine. You need to structure your code.

if (condition) {
else if (other condition) {
else {


i m currently using a dell laptop.


Anyway, the underlying problem here is the structure of the code, as per my example.

Did you get it to work?


No its not working!!!


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