title: Should I use curly brackets {} or square brackets [] in this case?
body: <p>Currently I have an array using an increasing index:</p>
  
  <pre><code>var idx = 1;
  var a = [];
  a[idx++] = "apple";
  a[idx++] = "orange";
  ...
  console.log(a[2]);
  </code></pre>
  
  <p>And only accessing it by <code>[]</code>, not using array specific functions, like <code>length</code>, <code>indexOf</code>, ...</p>
  
  <p>Apparently following is also working in this case:</p>
  
  <pre><code>var a = {};
  </code></pre>
  
  <p>So, which one should I prefer in such case? For example any performance difference between them?</p>