JavaScript Array splice vs slice
<p>What is the difference between <code>splice</code> and <code>slice</code> ?</p>
<pre class="lang-js prettyprint-override"><code>const array = [1, 2, 3, 4, 5];
array.splice(index, 1);
array.slice(index, 1);
</code></pre>