title: Using an integer as a key in an associative array in JavaScript
body: <p>When I create a new JavaScript array, and use an integer as a key, each element of that array up to the integer is created as undefined.</p>
  <p>For example:</p>
  <pre><code>var test = new Array();
  test[2300] = 'Some string';
  console.log(test);
  </code></pre>
  <p>will output 2298 undefined's and one 'Some string'.</p>
  <p>How should I get JavaScript to use 2300 as a string instead of an integer, or how should I keep it from instantiating 2299 empty indices?</p>