Code Your own Adventure: SytaxError: unterminated string literal


#1

Can anybody see why my code is not working?

var user = prompt("Do you want to play a game?\ Type yes, no, or maybe").toUpperCase();

switch(user){
case 'YES':
if(user === 'YES' && user === 'NO'){
confirm("We are going to be here all day!);
}else{
confirm("I didn't get a valid answer.");
}
break;
case 'NO':
confirm("Have a great day!");
break;
case 'MAYBE':
if(user === 'NO' || user === 'MAYBE'){
confirm("Excellent");
}
break;
default:
confirm("I didn't get a valid answer.");
}


#2

The error is right here this line in the "YES" block

confirm("I didn't get a valid answer.");

should be

confirm("We are going to be here all day!");