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