Switch statement with default

why is this not working?

function switchOfStuff(val) {
  var answer = "";
  // Only change code below this line
  switch (val){
  case 'a': 
  answer = 'apple';
  break;
   case 'b': 
  answer = 'bird';
  break;
   case 'c': 
  answer = 'cat';
  break;
   default: 
  answer = 'stuff';
  break;
  // Only change code above this line  
  return answer;  
}
}
// Change this value to test
switchOfStuff('b');

I reset the code and pasted back the switch statements it’s still not working properly

I had the closing } in the wrong area, it works now.

1 Like