Javascript, reverse an array with sort function
👉🏻 Do you know how to reverse an array with sort function.
Alternatives;
arr.map((e,i,a) => a[a.length-i-1])
arr.map((e,i,a) => a.at(-i-1))
arr.reduceRight((p, c) => [...p, c], [])
arr.reduce((p, c) => [c, ...p], []);