7/11 code compiles but challenge not passed


#1

what is wrong with my code? It compiles properly, but it wont let me move on to the next step.



let moonPhase = "full";
if (moonPhase = "full")
  {console.log('Howl!')}
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')};



#2

Needs to use a comparison operator, not an assignment operator.


#3

ok thanks. that makes sense judging from lesson title lol.


#4

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