MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / shuffle

Function shuffle

assets/js/maze.js:5–11  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

3}
4
5function shuffle(a) {
6 for (let i = a.length - 1; i > 0; i--) {
7 const j = Math.floor(Math.random() * (i + 1));
8 [a[i], a[j]] = [a[j], a[i]];
9 }
10 return a;
11}
12
13function changeBrightness(factor, sprite) {
14 var virtCanvas = document.createElement("canvas");

Callers 1

defineMazeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected