Selecting from Many Options with Switch Statements helpp

Selecting from Many Options with Switch Statements helpp
0

#1

Tell us what’s happening:
I’m not necessarily sure what this exercise is trying to get me to do. Can someone provide direction? My code is below.

Your code so far
switch(1) {
case === 1:
“alpha”;
break;case === 2:
“beta”;
break;case === 3:
“gamma”;
break;case === 4:
“delta”;
break;
}


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

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements/


#2

hmm, I think you have misunderstood the switch statement.
you can review the instructions again or try reading more about this before you attempt the exercise here:
https://www.w3schools.com/jsref/jsref_switch.asp


#3

Yeah I got it to work ! Thank you. If anyone else sees this no need to reply.