Javascript – Why has my array element been changed by this declaration?
Javascript code: const bigArray2 = [ [1, 2, 3], [2, 4, 6], [3, 6, 9], ]; //creates single-layer array containing all elements of every array within bigArray2 const combinedArray = bigArray2.reduce((accumulated, current) => { for (element of current) { accumulated.push(element);…