Logical Operators Help!


#1

Why am I getting an unexpected identifier?

var fighting = prompt("What is the best fighting style?").toUpperCase();

switch(fighting) {
case'Striking':
var Boxing = prompt("Best hand speed").toUpperCase();
var Maui Tai = prompt("Good use of elbows and knees.").toUpperCase();

    if(Boxing === "yes" || Maui Tai === "yes") {
        console.log("You must keep the fight standing to win.");
    }
    else{
        console.log("You should learn Jiu Jitsu");
    }
    break;
    case'Jiu Jitsu':
        console.log("Bully proof.");
        break;
        case'Wrestling':
            var Take downs = prompt("Dominant positions").toUpperCase();
            var Hard work = prompt("Makes great athelets.").toUpperCase();

            if(Take downs === "yes" && Hard work === "yes"){
                console.log("You must keep the fight on the ground");
            }
                else{
                    console.log("You should learn some striking or jiu jitsu");
                }
            break;
            default:
            console.log("Don't chicken out on me...");

}


#2

@giovanni80
First of all, your variables can't have space. So per example, instead of Take downs, you can say takeDowns like a good variable should be. Next, you can't declare variable inside of a switch.


#3

Thank you sooooooooo muck