Don't understand the firts solution

Hello , i don’t understand about the 1st solution with that :

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

  // Only change code above this line
  return answer;

// Change this value to test

How   var answer = ""; can take val if it's note declare like : 
var answer = "val";  ????

Can you paste the link of the challenge here?

I found the link of the challenge.

The code tells us that val is the variable of the function caseInSwitch(), and inside this function there is another variable answer.
In this case, for example, if val equals 1, then answer equals "alpha"

1 Like

i understand now thanks a lot ! :smiley: