Switch statements with Default

Switch statements with Default
0

#1

Tell us what’s happening:
I followed the instruction but can’t seem to make this work.

Your code so far

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

// Only change code above this line
return answer;
}

// Change this value to test
switchOfStuff(1);



// Change this value to test
switchOfStuff(4);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge:


#2

you are creating 2 functions with the same name. I think you should remove one of those.