5. Logical Operators



Oops, try again. There was a problem with your syntax. SyntaxError: Unexpected token var

I know I'm close but it just doesn't seem to work. No matter what I put in, I get the same error codes. Can someone please look at this and see if you can see what I haven't seen yet. Thank you.

var user = prompt("Where do you think your going?").toUpperCase;
var user = prompt("Name?");

switch(user) {
    case 'Juno':
        console.log("Hey, what kind of name is that?");
    case 'Dionne':
        console.log("Weren't you supposed to be at the party?");
    case 'Adrian':
        console.log("Adrian McNeill! is that you?");
        console.log("You're not the one I've been looking for!");
switch(month) {
    case 'holiday'
    var party = prompt("What party to you want to go to?").toLowerCase()
    var stayHome = prompt("I guess you're not going.").toLowerCase()
    party = true;
    stayHome = false; 
    if(day&&1=yes) {
        console.log("Happy Birthday");
    else {
        console.log("Merry Christmas"); 
        case " ":
            console.log("Which party is it at this point?");
            console.log("Are you sure that's the right one?");    


Missing : on case statement.

The above declares and defines the same variable twice, wiping out the first declaration.


How do I fix this? I'm still trying to understand.


should I take out the case and leave the 2 variables, party and stayHome?


The unexpected var is a result of the missing colon...

case 'holiday':


Not if you mean for it to be there.

1) Ask yourself what you mean for that general area to behave
2) Find out what that looks like
3) Compare to what's there


I always leave something out and then I don't see where it should be. Thank you for that.


Everyone does that all the time. We therefore have to be able to find them. Can you see how you would find this missing one here based on the information that you had?