title: How to use a string as a variable name in Javascript?
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/1441532/is-there-a-way-to-access-a-javascript-variable-using-a-string-that-contains-the-n">Is there a way to access a javascript variable using a string that contains the name of the variable?</a><br>
    <a href="https://stackoverflow.com/questions/1920867/javascript-get-local-variable-dynamicly-by-name-string">JavaScript: Get local variable dynamicly by name string</a>  </p>
  </blockquote>
  
  
  
  <p>A simple code to illustrate my problem -</p>
  
  <pre><code>var chat_1 = "one";
  
  var chat_2 = "two";
  
  var id = "1";
  
  var new = ?? variabalize( 'chat_' + id ) 
  </code></pre>
  
  <p>I want the variable new to be assigned the value of variable - chat_1 which is "one"</p>