We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aab5daf commit c068372Copy full SHA for c068372
src/common/utils.ts
@@ -2,9 +2,9 @@
2
// Licensed under the MIT license.
3
4
export function shuffleList<T>(array: T[]): T[] {
5
- for (let i = array.length - 1; i > 0; i--) {
6
- const j = Math.floor(Math.random() * (i + 1));
7
- [array[i], array[j]] = [array[j], array[i]];
8
- }
9
- return array;
+ for (let i = array.length - 1; i > 0; i--) {
+ const j = Math.floor(Math.random() * (i + 1));
+ [array[i], array[j]] = [array[j], array[i]];
+ }
+ return array;
10
}
0 commit comments