vendredi 15 novembre 2019

Is there a faster, easier way to write several if statements with multiple AND conditions?

Is there an easy way to cater for all the possible combinations without having to manually write all of these if statements?

var ups;
var trans;
var sat;
var kplc;

 if(ups === 'false' && trans ==='true'&& sat ==='true' && kplc ==='true'){
            //do something
}

Aucun commentaire:

Enregistrer un commentaire