Repeating and randomizing string arrays

Upper expression assigns a randomly chosen index [rnd] to the current index [idx].

After that, the randomly chosen index [rnd] is assigned w/ the previous index [idx] value tmp.

That is effectively a value swapping between the randomly chosen index [rnd] & the current index [idx].

For more info about this Fisher–Yates shuffling algorithm, go here: Fisher–Yates Shuffle

2 Likes