Tips to cope with scoping rules of top level `for` loops etc

made this post in julia usage, juno with atom

it probably should be moved to here since its more about scoping rules in general and clarity of the documentation (wrt scoping and other issues)?