JSFiddle - React, Tailwind, and code Playground
by clauswilke
JavaScript
let a = ["a", "b", "c", "d", "e", "f"]
let s1 = (a)=>a.sort(() => .5 - Math.random())
let s2 = (a)=>a.map((x)=>[x, Math.random()]).sort((x, y)=>x[1]-y[1]).map((x)=>x[0])
console.log(s2(a))