You should not use any if statements anywhere in the editor.
Can you tell me what’s wrong with it please?
Il tuo codice fino ad ora
function chainToSwitch(val) {
var answer = "";
// Modifica il codice solo sotto questa riga
switch (val) {
case "bob": answer= "Marley"; break;
case 42: answer= "The Answer";break;
case 1: answer= "There is no #1";break;
case 99: answer= "Missed me by this much!";break;
case 7: answer= "Ate Nine";break;
}
// Modifica il codice solo sopra questa riga
return answer;
}
chainToSwitch(7);
**Informazioni del tuo browser:**
Lo user agent è: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
It looks like the tests for this challenge need to be revised, your code is correct, but the tests scan the code for the word if and find it in the comment:
|
|
V
// Modifica il codice solo sopra questa riga
You can pass the challenge if you delete those two comments.