Supposing all functions are implemented in the same component, you could make the functions retain some state in order to get rid of the multiple branches in the flow. EG: `checkCondition1()` would become `evaluateCondition1()`, on which it would check condition 1 is met; is so then it saves some value to be retrieved by `getConditionNumber()`. `checkCondition2()` would become `evaluateCondition2()`, on which it would check if the previous condition 1 was met. If previous condition was not met, then it checks for condition scenario 2, saving a cache value to be retrieved by `getConditionNumber()`. And so on. evaluateCondition1(); evaluateCondition2(); evaluateCondition3(); evaluateCondition4(); if (anyCondition()) { addAlert(getConditionNumber()); }