Stuck with Replacing If Else Chains with Switch

Tell us what’s happening:
i 'am stuck with this lesson i tried the hint but there is no hint.

Your code so far


function chainToSwitch(val) {
  var answer = "";
  // Only change code below this line
  switch(val === chainToSwitch()){
    case 1:
      ('bob')
    answer = 'Marley';
    break
    case 2:
    answer = 'The Answer';
    break
    case 3:
    answer = 'There is no #1';
    break
    case 4:
    answer = 'Missed me by this much!';
    break
    case 5:
    answer = 'Ate Nine';
    break
  }
  
  
  // Only change code above this line  
  return answer;  
}

// Change this value to test
chainToSwitch(7);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch

You don’t handle the 7 case…?

What is your thought process behind this?

You also need to fix your first case (case 1). Whatever comes after “case” is the condition, which in this challenge means the number passed in the function call. Change your case to “bob”.

change this line
switch(val === chainToSwitch()){
to this
switch(val){

thanks for the help it worked i changed the case to ‘bob’: and all the other cases

thanks for the help i changed the code to switch(val) and all the other cases and it worked