Can someone explain this syntax


#1

I saw this code on stackoverflow about shuffling an array and wondered what it meant

   const someArray = [1, 2, 3, 4, 5];

   someArray.sort(() => Math.random() * 2 - 1);

Thanks


#2

Kirupa wrote about this here: https://www.kirupa.com/html5/arrow_functions.htm


#3

Thank you!