title: JavaScript array deobfuscation
body: <p>Solved: <a href="https://stackoverflow.com/questions/27627158/replace-array-mapped-variables-with-the-actual-variable-name-string">Replace array-mapped variables with the actual variable name/string?</a></p>
  
  <p>I'm trying to decode some JS and I've got a good portion of it done, however, I'm stumped here. The code does something like this:</p>
  
  <pre><code>var arr = ["value", "value1", "value2"];
  console.log(arr[0]);
  </code></pre>
  
  <p>Except the file is around 12k lines and there are over 1.4k things in the array.
  Is there a way I can replace <code>arr[0]</code> with the actual value of <code>arr[0]</code> (in the example, it would be "value"), then save the file? I tried using RegExp but got nowhere.</p>
  
  <p>Any help will be appreciated.</p>