Control flow refers to the order in which individual statements, instructions, or function calls are executed in a program
The ability to make control flow intuitive is a key strength of programming languages
JavaScript's async/await and Promises are successful examples of this
Push Conditional Programming up and Loop Programming down
This can result in fewer checks overall, centralizing control flow in a single function, and making it easier to notice redundancies and dead conditions for code quality and performance
Push Ifs Up And Fors Down
A short note on two related rules of thumb.
https://matklad.github.io/2023/11/15/push-ifs-up-and-fors-down.html

Seonglae Cho