I am very new to JQuery, so sorry if this is a naive question. I am trying to randomize an array of 3 numbers, 35 times. Each time I shuffle the array of 3-numbers and write to console, it looks like a new shuffle is produced. However, when I add each new shuffling to an array and print the entirety of its contents, it seems that the array subsists of 35 copies of the last shuffle made.
Thanks in advance!
var arr2 = [0,1,2];
var seedArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
var arr2AggregateArray = [];
for (i = 0; i < 35; i++) {
seed = seedArray[i];
shuffle(arr2,seed);
console.log(arr2);
arr2AggregateArray[i] = arr2;
console.log(arr2);
}
console.log(arr2AggregateArray);