I have been trying to work this issue of on Codecademy all day. Nothing I do seems to work.
Instructions: "Add some if/else statements to your cases that check to see whether one condition and another condition are true, as well as whether one condition or another condition are true. Use && and || at least one time each."
This is the code I previously entered:
var user = prompt("What is your name?").toUpperCase();
switch(user) {
case 'Sam':
console.log("Hi, Sam");
break;
case 'John':
console.log("Hi, John");
break;
case 'Mary':
console.log("Hi, Mary");
break;
default:
console.log("I don't know you. What is your name?");
}
Aucun commentaire:
Enregistrer un commentaire