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


#1

I have no idea what's wrong?

var moonPhase = 'full';
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');
}

#2

Hi, make sure to follow the instructions promptly. There are about four (4) instructions, the code you posted was for the first instruction, you didn't log what should happen if the moonPhase is "full". For example:

var moonPhase = "full";

if (moonPhase === "full") {
console.log("Howwwwlll!!");
}

if (moonPhase === 'mostly full') {
console.log('Arms and legs are getting hairier'); //and then the rest of the code//

Check the other instructions and follow them.


#3

Thanks, @toyor009!!!


#4

You're welcome:slight_smile:


#5

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