SWITCH statement


#1


The Output is not the exact answer! Pls check my code:


var moonPhase = 'full';
switch(moonPhase){
    case'full':
    	console.log('Howwwlll!!');
      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

console.log(Arms and legs are getting hairier);

Now compare it to the other console.log you wrote.
What do you notice?


#4

Yeah!! I forgot to put them on.......>> '.Arms and legs.......' <<
Thx a lot!!
:smile:


#5

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