Sometimes you want to randomize the values within an array. To achieve this you can use the Array.sort function with a random compareFunction.
const array = ["one", "two", "three", "four"]
array.sort(compareFn: function(){ return Math.random() - 0.5})
console.log(array)