JavaScript>Control Flow>SwitchCase exercise>moonPhase exercise


#1

I am stuck with the moonPhase exercise . I followed the instructions and made edits in the code after following the hints. However still not able to run the code and view the output.

Here is my code:
var moonPhase = 'full';

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

I don't see the green tick on the left that indicates that the code ran succesfully.

Please help

`


#2

A default tag does not need a break statement just a closing bracket after the condition,


#3

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