4 switch


var user = prompt("What is your favorite color? (Blue or Yellow?)").toLowerCase();

switch (user) {
case: 'blue'
console.log("You may pass the bridge");
case: 'yellow'
console.log("Blue, No, Yelloooooowwww....");
case: 'red'
console.log("A killer rabbit appears out of nowhere and rips your throat open!");
console.log("Tim the Enchanter blasts you with a fireball!");

I am getting the "error unexpected token :" message and honestly I cannot see what I am missing?


I think you should put

case 'blue' :
instead of
case: 'blue'

the semicolon placed is important.
correct me if I'm wrong :slight_smile:


Haha the Quest for the Holy Grail? (this isnt like for advice just had to comment xD)