Moon phases problem


This is the error message that popped up. I tried changing moonphase to "mostly new", and the code worked, but the error message still popped up

Did you write an else if statement for if the moonPhase is mostly new?

var moonphase="full";
if (moonphase==="full") {
} else if (moonphase==="full") {
  console.log("I swear I am not a werewolf...");
} 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("Invalid moon phase");


Check your spelling. JavaScript is case sensitive.


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