title: Why doesn't array.splice() work when the array has only 1 element?
body: <p>Is this intended behavior?  I would expect an empty array to be returned here.</p>
  
  <p>JavaScript</p>
  
  <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>let arr = [1];
  console.log(arr.splice(0, 1))</code></pre>
  </div>
  </div>
  </p>
  
  <p>Console</p>
  
  <pre><code>1
  </code></pre>