Whats wrong here? 7.Switch Statements


#1


https://www.codecademy.com/en/courses/learn-javascript/lessons/control-flow/exercises/switch


Did you write full as a case?


Replace this line with your code. 
var moonPhase ='full';
switch (moonPhase) {
  case 'full' :
  console.log("Awwww!");
break;
case 'mostly full':
         console.log("Arms and legs are getting hairier");
break;
         
case 'mostly new': 
  console.log("back on two feet");
break;
    
default:
  console.log("Invalid moon phase");
  break;

}


#2

case 'full' :

you just need to remove the space before :


#3

Hi, i have checked it out your code ,It is working fine . m getting "Awww" in my console.


#4

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