mardi 19 octobre 2021

Optimize boolean condition in IF statements

I have the following conditions :

if (a && (b || c)) {
 await t1();
}
if(b) {
  await t2();
 }

Considering t2 should be done AFTER t1, is there a way to optimize those conditions ?

Aucun commentaire:

Enregistrer un commentaire