How do you write correctly formatted switch code in regards to the werewolf instructions?

let moonPhase = 'full';
switch (moonPhase) {case 'full':
  case: 'mostly full':
console.log('Arms and legs are getting hairier');
  case: 'mostly new':
console.log('Back on two feet');
console.log('Invalid moon phase');

I believe there is either some error with the introductory material or I am make an error that I can’t identify. I am erring on the side that it may be my fault, which is decreasing my confidence to go on with the other material. I am sure I am not the only person experiencing this problem.

I don’t know if I categorized it under the right topic so feel free to correct me. I am hoping to sound open to criticism


please include the exercise url and your error message


switch (groceryitem) 

why use groceryitem? Where is this variable coming from?



Im editing it right now. It is still marking it wrong despite that.


I have edited the link. Please help me when possible.


running your new code, it produces an error:

  case: 'mostly full':

this clearly indicates that there is a syntax problem with your code? Do you see it?

Good you fixed the variable on which the statement is executed


switch statement blocking…

switch (expression) {
case match_expression:
  // code statements
case ____:
  // code statements
  // code statements


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