Array.prototype.shuffle() Shuffle the array randomly. let arr = [1, 2, 3, 4, 5]; arr.shuffle(); console.log(arr); // [ 2, 1, 4, 3, 5 ]