# Loop doesn't work

**URL:** https://discourse.julialang.org/t/loop-doesnt-work/64035
**Category:** General Usage
**Tags:** loops
**Created:** [July 4, 2021, 12:34pm UTC](https://discourse.julialang.org/t/loop-doesnt-work/64035 "2021-07-04T12:34:49Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [July 4, 2021, 12:55pm UTC](https://discourse.julialang.org/t/loop-doesnt-work/64035/3 "2021-07-04T12:55:54Z")

</div>

Note that you are apparently using an ancient version of Julia (\< 1.5). If you upgrade to the latest version (1.6), then (a) your code will work fine in an interactive environment (e.g. the REPL) and (b) in a script it will give a clearer error message. (If you use Jupyter notebooks, then it will work in earlier versions too.)

See also long discussions at [Another possible solution to the global scope debacle](https://discourse.julialang.org/t/another-possible-solution-to-the-global-scope-debacle/15894) and [RFC: bring back v0.6 scope rules in the REPL by JeffBezanson · Pull Request #33864 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/33864)

---

_[View the full topic](https://discourse.julialang.org/t/loop-doesnt-work/64035)._
