I understand explicitly passing the variable will do the work. However, what's the purpose of global variables? I thought this conflicts with one of the examples in the Introduction chapter.
Secondly, I don't understand the different results between Example 1 and 2. Something deeper is happening here, I feel.