mercredi 17 février 2016

checking nested if statement, where to exit

a = 1;
b = 2;
c =3;
d = 4;
if(a == 1){
                console.log('a');
    if(b == 2){
                    console.log('b');
        if(c==4){
            console.log('c');
        }
    }
}

The above is my code. I need to check where the if loop get break. in above code i need to display the value of c. because c value is 3, but not 4. how can I?

Aucun commentaire:

Enregistrer un commentaire