title: TypeError: Cannot assign to read only property '0' of object '[object Array]' how to solve?
body: <p>I have array with objects <code>codeData</code>, and I want to make array with arrays(in every array 3 objects) , and I made something like that:</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 codeData = [{el: 1}, {el: 2} , {el: 3}, {el: 4}, {el: 5}, {el: 6}]
  let arr = [...Array(Math.ceil(codeData.length / 3))].map(_ =&gt; codeData.splice(0, 3))
  
  console.log(arr)</code></pre>
  </div>
  </div>
  </p>
  <p>But it caused this error. How I can solve this?</p>