title: How does the spread syntax affect array splice
body: <p>I found the following code and I don't know what is the difference between A and B:                         </p>
  
  <pre><code>var fruits = ["Banana", "Orange", "Apple", "Mango"];
  </code></pre>
  
  <p>A</p>
  
  <pre><code>fruits.splice(2,0,["Lemon", "Kiwi"]);
  </code></pre>
  
  <p>B</p>
  
  <pre><code>fruits.splice(...[2,0].concat(["Lemon", "Kiwi"]));
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var fruits = ["Banana", "Orange", "Apple", "Mango"];
  var A = fruits.splice(2, 0, ["Lemon", "Kiwi"]);
  var B = fruits.splice(...[2, 0].concat(["Lemon", "Kiwi"]));
  
  console.log(A)
  console.log(B)</code></pre>
  </div>
  </div>
  </p>