File size: 224 Bytes
2898d65 |
1 2 3 4 5 6 7 8 |
export const shuffleArray = (items: any[]) => {
for (let i = items.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
const temp = items[i];
items[i] = items[j];
items[j] = temp;
}
} |