# 5 - logical operators (problem with nested if's)

#1

I bolded the relevant part. I'm wondering why when a user inputs "football" and then says they ARE a Dolphins fan..."Who Dat!" still alerts. Or if they say they are not a dolphins fan, it still says "Same!" before going to "Who Dat!"

var sport = prompt("What's your favorite sport? Feel free to pick two.").toUpperCase();

switch(sport){
break;
case 'FOOTBALL':
var team1 = prompt("Are you a Dolphins fan? Y/N/MAYBE");
if(team1 = "Y"){
else if(team1 = "N" || "MAYBE"){
var team2 = prompt("How about a Saint's fan?");}
if(team2 = "Y"){
else if(team2 = "N" || "MAYBE"){
break;
case 'BASEBALL':
break;
case 'Football' && 'BASEBALL':
break;
default:
break;}

#2

Hi @jfirest

I can tell you some advices :

• In a switch, there is no "break;" after "default" (line 35)
• "Football" should be "FOOTBALL" (line 29)
• 'Football' && "BASEBALL" it's impossible, you should write:
'FOOTBALL AND BASEBALL' in your case (line 29)
• You have to put "==" not "=" in your "if" and "else if" condition
• After team1 and team2 you have to put .toUpperCase method
• Team2 should be in the same "else if"

Look your code in a correct syntax :

``````var sport = prompt("What's your favorite sport? Feel free to pick two.").toUpperCase();

switch(sport){
break;

case 'FOOTBALL':
var team1 = prompt("Are you a Dolphins fan? Y/N/MAYBE").toUpperCase();

if(team1 == "Y"){
}else if(team1 == "N" || team1 == "MAYBE"){
var team2 = prompt("How about a Saint's fan?").toUpperCase;
if(team2 == "Y"){
}else if(team2 == "N" || team2 == "MAYBE"){
}
};
break;

case 'BASEBALL':
break;

case 'FOOTBALL AND BASEBALL':
break;

default: