title: Push value into array without filling (Javascript)
body: <p>Is there a way to give a specific index, in an array, a value. In PHP, I could just do this $arr[index] = val;</p>
  
  <p>Right now, I use</p>
  
  <pre><code>Array.prototype.insert = function (index, item) {
    this.splice(index, 0, item);
  };
  </code></pre>
  
  <p>And</p>
  
  <pre><code>var mute = [];
  mute.insert(index, 'value');
  </code></pre>
  
  <p>But, if the array is empty, the index will still be 0. How do I get the right index?</p>