a.black-text,
a:hover.black-text {
color: black;
}
Can somebody please help me with Replacing If Else Chains with Switch in JavaScript? Here is my code:
function chainToSwitch(val) {
var answer = "";
// Only change code below this line
switch (val === "bob") {
case 1:
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;
default:
answer = "Ate Nine";
break;
}
// Only change code above this line
return answer;
}
// Change this value to test
chainToSwitch(7);
Here is the link: https://www.freecodecamp.com/challenges/replacing-if-else-chains-with-switch