Skip to content

Tag: multidimensional-array

Function which is swapping Elements in an Array of Arrays, returns undefined at the specific Indexes

I have an Array of Arrays. My Array is called splitarr[Array2[],Array1[],Array0[],Array3[]…]. It is not ordered correctly from Index Zero to index 2. So I want to swap splitarr that it looks more like this => splitarr[Array0[],Array1[],Array2[],Array3[]…]. However my code does not seem to work. When i try to console.log my Array, the indexes where the […]