# REPL and for loops (scope behavior change)

**URL:** <https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514>\
**Category:** General Usage\
**Created:** [August 15, 2018, 5:26pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514 "2018-08-15T17:26:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![saschatimme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saschatimme/32/10313_2.png) [@saschatimme](https://discourse.julialang.org/u/saschatimme)\
**Post date:** [August 15, 2018, 5:36pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514/3 "2018-08-15T17:36:58Z")

</div>

Thank you, I knew about the scoping, but not that you could use `global` in the loop!  
But still this somehow feels broken, I cannot simply copy code out of a function in the REPL to debug it ☹ (In the lack of a proper debugger)

---

_[View the full topic](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514)._
