"Selecting from Many Options with Switch Statements "

"Selecting from Many Options with Switch Statements "


I don’t know what I am doing wrong. If anybody can point out the mistakes, I would appreciate it.

function caseInSwitch(val) {
  var answer = "val";
  // Only change code below this line
  switch(val) {
    case "1":
    case "2":
    case "3":
    case "4":
  // Only change code above this line  
  return answer;  

// Change this value to test

Your browser information:

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

Link to the challenge:


The lines like this are not JavaScript commands. They don’t do anything. You are always returning “val” because that is what answer is set to and you return answer.

Also, numbers are different from strings so 1 is not the same as "1".


So should I write just 1 instead of “1”?
Also, instead of writing “alpha”, what would the correct thing to write be?


Never mind I understand now. Thank You!