title: Difference between array.push and array.splice in this scenario
body: <p>I am working with an open source project I wan't to change the line...</p>
  
  <pre><code>this.model[this.config.childrenPropertyName].push(child.model);
  </code></pre>
  
  <p>to</p>
  
  <pre><code>this.model[this.config.childrenPropertyName].splice(this.model.length, 0, child.model);
  </code></pre>
  
  <p>But it breaks the ordering on the object model (this is a tree implementation). But when I test the two methods in a test harness they seem to preserve the order. I thought that implemented as above they would do EXACTLY the same thing...</p>
  
  <p>NOTE :  This was just a silly coding error on my part and there is no difference between the two as answered correctly below</p>