title: javascript array unsure property array[index] = true/false
body: <p>I came across this, understood it but still did not know what javascript property it was:</p>
  
  <pre><code>var array = [];
  
  array[1] = true;
  
  array[5] = true;
  
  console.log(array) #=&gt; [true, true]
  
  array[0] #=&gt; undefined
  
  array[1]  #=&gt; true
  
  array[2] #=&gt; undefined
  
  array[5] #=&gt; true
  </code></pre>
  
  <p>Can someone explain this for me? Thanks</p>