lundi 25 février 2019

If else condition - Javascript

I will use three variables for this,

I have requirement to do something like:

1. if(A found in B and not C){
    //do something
}
2. if(A found in C and not B){
    //do something
}
3. if(A is found in both (B, C) or in none (B,C)){
    //do something
}

How do I proceed the best way with logic and syntax (javascript)?

Aucun commentaire:

Enregistrer un commentaire