We used a function to do the same thing which is only a couple of lines .... you could re-factor to use the following: ``function shuffle(array) { array.sort(() => Math.random() - 0.5); }``
We used a function to do the same thing which is only a couple of lines .... you could re-factor to use the following:
function shuffle(array) { array.sort(() => Math.random() - 0.5); }