As I felt the original example didn't quite illustrate in what situations the order of code execution matters, I made this second example. This example also illustrate a way to make it, in my mind, more intuitive. See inside. All code by me (@kriblo).