title: Use dynamic variable names in JavaScript
body: <p>In PHP you can do amazing/horrendous things like this:</p>
  
  <pre><code>$a = 1;
  $b = 2;
  $c = 3;
  $name = 'a';
  echo $$name;
  // prints 1
  </code></pre>
  
  <p>Is there any way of doing something like this with Javascript?</p>
  
  <p>E.g. if I have a <code>var name = 'the name of the variable';</code> can I get a reference to the variable with name <code>name</code>?</p>