I dont know what's wrong (Logical Operators)


#1


var user = prompt("What have you been doing since the last time we met?").toLowerCase();

switch(user){
    case 'on another adventure':
        var far = prompt("Is it far away?").toLowerCase();
        var close = prompt("Is it near by?").toLowerCase();
        if( far === 'yes' || close === 'yes') {
        console.log("You've been busier than ever.");
        }else{
            console.log("Well what have you been doing this whole time?!");
       }
        break;
    case 'with family':
        var  helping = prompt("have you been helping out?").toLowerCase();
        var  parents = prompt("how about your Parents?").toLowerCase();
    if( helping === 'yes' && parents === 'yes');{
        console.log("Well family is important.");
    }else{
        console.log("Well I'll let you be off.");
       }
       break;
    case 'busy':
    var veryBusy = prompt("have you been very busy?").toLowerCase();
    var busy = prompt("or just 'busy'?").toLowerCase();
    if(veryBusy === 'yes' || busy === 'yes');{
        console.log("I wonder doing what");
    }else{
    console.log("Well thats specific.");
    }
    break;
    default:
        console.log("Intresting.");
}


#2

Just remove semicolon from this two line :

if(veryBusy === 'yes' || busy === 'yes');{}
if( helping === 'yes' && parents === 'yes');{}


#3

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