I have some arrays and want to randomise them using shuffle (as explained here)
However, I want all my arrays to be concatenated into one big array and them go through the array one by one.
Now I noticed that neither this:
var proxies = [
{stim: A},
{stim: B},
{stim: C},
{stim: D}]
var a = shuffle(proxies); var b = shuffle(proxies); var c = shuffle(proxies);
var x = a.concat(b, c)
nor that:
var x = shuffle(proxies).concat(shuffle(proxies), shuffle(proxies))
does produce a larger array which is composed of three different shuffled orders of my initial proxies array.
If I log to console, I see that for both options it always one shuffled order repeated three times. It seems as if it is shuffled only once and then remains in that order.
Ideas about fixing this?