# Confused about global vs local scoping in for loops in 1.0

**URL:** <https://discourse.julialang.org/t/confused-about-global-vs-local-scoping-in-for-loops-in-1-0/16318>\
**Category:** New to Julia\
**Created:** [October 14, 2018, 7:16pm UTC](https://discourse.julialang.org/t/confused-about-global-vs-local-scoping-in-for-loops-in-1-0/16318 "2018-10-14T19:16:08Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Vic](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@Vic](https://discourse.julialang.org/u/Vic)\
**Post date:** [October 23, 2018, 6:36pm UTC](https://discourse.julialang.org/t/confused-about-global-vs-local-scoping-in-for-loops-in-1-0/16318/15 "2018-10-23T18:36:14Z")

</div>

see also [Understanding while loop UndedVarError and scope - #14 by kristoffer.carlsson](https://discourse.julialang.org/t/understanding-while-loop-undedvarerror-and-scope/16609/14)

> [@jonjilla](#):
>
> What about If/else blocks. Why don’t those have local scoping rules similar to for/while/try?

Good question

---

_[View the full topic](https://discourse.julialang.org/t/confused-about-global-vs-local-scoping-in-for-loops-in-1-0/16318)._
