I want to learn how to handle big and complex conditions.
Example:
if (
!Array.includes(someField) &&
!Array.includes(otherField) &&
dialogCondition == "Somehting" &&
phraseCondition !== "anotherThing" &&
AnotherCondition == null &&
lastButNotLeastCondition != null &&
isConditionTrue
){
certainAction()
}
This is an example I have. It's working, but I want to learn the good practice of how to handle a complex if statement.
Aucun commentaire:
Enregistrer un commentaire