Why do I have a syntax error?


#1

var user = prompt("Do you want to play?").toLowerCase();
switch(user)
{

case 'no':
    console.log("weirdo");
    break;
case 'yes':
    if ('yes'&&'maybe')
    {
        console.log("you can do it!");
    }
    if else ( 'maybe' || 'yes')
    { 
        console.log(" get yo head in da game.");
    }
    else 
    {
        console.log("let's do this!");
    }
    break;
default:
    console.log("play!!");

}

can someone tell me what's wrong with this?
Thanks!


#2

Have you tried using else if instead ? ..