DEV Community

Discussion on: An IoC pattern to avoid repetitive if statements

Collapse
 
ziabatimane profile image
Ziabat Imane

Hello Tomaz.

Thank you, I liked your idea.

Wondering how can we use it in case we have many levels of nested if-else, something like :

If condition A is met then do something
If condition A and condition B is met do something else
If condition A is met and condition C is met perform some different action