Randomly return -1, 0, or 1. This is an easy way to shuffle an array.
[1, 2, 3, 4, 5].sort(byRandom); // shuffled order, e.g. [3, 1, 5, 2, 4] Copy
[1, 2, 3, 4, 5].sort(byRandom); // shuffled order, e.g. [3, 1, 5, 2, 4]
Randomly return -1, 0, or 1. This is an easy way to shuffle an array.