Can anyone tell me what is wrong with this please? It says illegal token


#1


5 Logical Operators

SyntaxError: Unexpected token ILLEGAL

var user = prompt("What do you want to do?").toUpperCase();
switch(user) {
    case 'RETIRE':
        var money = 750000;
        var work = 'dull';
        if (money >= 100000 && work === 'interesting') {
            console.log("Nice");
        }
        else {
            console.log("Boo, no retirement);
        }
        break;
    case 'STAY AT WORK':
        var money = 1000000;
        var work = 'dull';
        if (money <= 100000 || work === 'interesting') {
            console.log("Boo");
        }
        else {
            console.log("no comment");
        }
        break;
    case 'WIN ON THE GEE GEES':
        console.log("Yes please");
        break;
    default:
        console.log("What are you saying?");
}


#2

At the end of the string then you are missing a quotation mark

Whenever all of your code is red then you know that you accidentally left a string unclosed. Hope this fixed the problem :slight_smile:


#3

HI this part

        else {
            console.log("Boo, no retirement);
        }

you forgot to close the string with "


#4

DOH - how could i have not spotted that. Thanks