Less 6 (Logical Operators) - Code Your Own Adventure....Can someone please help with my code


Here is a link to the section I am stuck on:

Following is my code. I'm receiving the following error message: "Syntax error: unexpected token else. I cannot figure out what I am doing wrong. Please help.

var user = prompt("You're in Pixie Hollow and you run into a fairy. Is it Tinkerbell, Vidia or Silvermist?").toUpperCase();

switch(user) {
var dress = prompt("Does she have a green dress (YES or NO)?").toUpperCase();
var shoes = prompt("Does she have fluffy green shoes (YES or NO)?").toUpperCase();
if(dress == 'YES' || shoes == 'YES'); {
console.log("She is wearing green something!");
} else {
console.log("She isn't wearing any green at all!" );

    var handbag = prompt("Is her bag blue (YES or NO)?").toUpperCase();
    var hairband = prompt("Is her hairband blue (YES or NO)?").toUpperCase();
    if(handbag == 'YES' && hairband == 'YES') {
    console.log("Both her accessories are blue!");
    } else {
    console.log("Her bag and hairband don't match");
    console.log("You didn't mention a fairy!");


I am getting an error message: Incorrect syntax: unexpected token else

Replace this line with your code.


could you remove the semi-colon just after the if and before the opening { ?

When I remove it, the code works for me


Thanks so much! It worked. Really appreciate your speedy response