Hi thier great persons. need some help checking my code


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-ZA2rb/0/4?curriculum_id=506324b3a7dffd00020bf661

SyntaxError: Unexpected token var

Replace this line with your code. 

var user = prompt ("hello who the fuck are you?")
.toLowerCase();
switch (money) {
    case  'POOR OR RICH':
    var poor = prompt("are you poor as fuck dude (YES or NO?)").toLowerCase();
     var rich =  prompt("you are rich?").toLowerCase();
    if (var rich === 'yes' || var poor === 'no')
    {
    console.log ("how stupid do you think we are letting you in?");
    }
    else
{
    console.log ("we also dont give an oppertunity for nediocare pepole")
}
break;
switch (beauty) {
    case  'BEAUTY OR UGLY':
    var beauty = prompt("do you think youre stunning (YES or NO?)").toLowerCase();
     var ugly =  prompt(" so you are rich?").toLowerCase();
    if (var beauty === 'yes' && var ugly === 'no')
    {
    console.log ("of course come in we are for the babes");
    }
    else
{
    console.log ("we also dont give an oppertunity for nediocare pepole")
}
break;
switch (strong) {
    case  'STRONG OR WEAK':
    var strong = prompt("do you think youre strong (YES or NO?)").toLowerCase();
     var weak =  prompt(" so you are a pussy?").toLowerCase();
    if (var beauty === 'yes' && var ugly === 'no')
    {
    console.log ("of course come you are a good match for the babes");
    }
    else
{
    console.log ("we also dont give an oppertunity for mediocare pepole")
}
break;
default:
console.log ("can you repeat your stupidity for me please cause clearly tou didn't understood the game");
};


#2

Okay.

Var is used to assign a variable. You are not doing so here. You are just to compare.

Also, you've got switch statement writing all wrong. See format.

switch(expression) {
    case n:
        code block
        break;
    case n:
        code block
        break;
    default:
        default code block
}

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.