Adding to existing switch


#1

var color = prompt("What's your favorite primary color?","Favorite is blue");

switch(color) {
case 'red':
console.log("Red's a good color!");
break;
case 'blue':
console.log("That's my favorite color, too!");
break;
//Add your case here!
case 'yellow' :
console.log ("Unlike don't like");
break
default:
console.log("I don't think that's a primary color!");
}
After I hit save and submit code button, pop up appears and then blink default.


I do understand why does it print only default?


#2

I fixed it here

var color = prompt("What's your favorite primary color?");

switch(color) {
case 'red':
console.log("Red's a good color!");
break;
case 'blue':
console.log("That's my favorite color, too!");
break;
//Add your case here!
case 'yellow' :
console.log ("Unlike don't like");
break;
default:
console.log("I don't think that's a primary color!");
}

Only say blue , or red, yellow

,"Favorite is blue" why is this there?


#3

I am sorry it says to put my choice there


#4

When the prompt comes up just type in blue and it will display the output for blue

same goes for red

and yellow