title: How can I eval a local variable in Julia
body: <pre><code>i = 50
  function test()
    i = 10
    eval(:i)
  end
  test()  # =&gt; 50
  </code></pre>
  
  <p>Why does this evaluate to the global <code>i</code> instead of the local one? Is there a way to make it evaluate to the local?</p>