# Problem with a variable

**URL:** https://discourse.julialang.org/t/problem-with-a-variable/24954
**Category:** Performance
**Created:** [June 5, 2019, 10:03am UTC](https://discourse.julialang.org/t/problem-with-a-variable/24954 "2019-06-05T10:03:47Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [June 5, 2019, 10:10am UTC](https://discourse.julialang.org/t/problem-with-a-variable/24954/2 "2019-06-05T10:10:54Z")

</div>

`for` introduces a new local scope, see [Scope of Variables · The Julia Language](https://docs.julialang.org/en/v1/manual/variables-and-scoping/). See [for loop - Scope of variables in Julia - Stack Overflow](https://stackoverflow.com/questions/51930537/scope-of-variables-in-julia) for some more discussion and solutions.

See also [PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530)

---

_[View the full topic](https://discourse.julialang.org/t/problem-with-a-variable/24954)._
