Creates a function that returns a newly shuffled copy on each call.
Source array; captured by the returned function and not mutated.
A zero-argument function that returns a fresh shuffled copy on each call.
const items = [1, 2, 3, 4];const shuffleNow = randomShuffler(items);shuffleNow(); // shuffled copy each call Copy
const items = [1, 2, 3, 4];const shuffleNow = randomShuffler(items);shuffleNow(); // shuffled copy each call
Creates a function that returns a newly shuffled copy on each call.