Is it possible to insert an array inside another keeping its original array form? I looked on google and didn't find what I wanted, so I'll try here. Should look like this:
arr1 = [1, 2 , 3]
arr2 = [4, 5, 6]
console.log(arr3) // [[1, 2, 3], [4, 5, 6]]
Create a new array that references your other arrays...
const arr3 = [arr1, arr2];
console.log(arr3);
// [[1, 2, 3], [4, 5, 6]]
Or this one use array.push()
let arr1 = [1, 2 , 3]
let arr2 = [4, 5, 6]
let arr3= []
arr3.push(arr1,arr2)
console.log(arr3)
Yes its possible like the below way
var arr1 = new Array (1, 2, 3);
var arr2 = new Array (4, 5, 6);
var arr3 = new Array();
arr3[0] = arr1;
arr3[1] = arr2;
console.log(JSON.stringify(arr3))