Convert Array To Conventional Array Js

[Solved] Convert Array To Conventional Array Js | Fortran - Code Explorer | yomemimo.com
Question : convert array to conventional array js

Answered by : attractive-addax-iq8zcicb2vcn

const arr = [1,2,3,4,5,6,7,8,9];
const newArr = [];
while(arr.length) newArr.push(arr.splice(0,3));
console.log(newArr);

Source : https://stackoverflow.com/questions/22464605/convert-a-1d-array-to-2d-array | Last Update : Wed, 20 Jul 22

Answers related to convert array to conventional array js

Code Explorer Popular Question For Fortran