randomly select item from array javascript code example
Example: get random elements from array javascript
array.sort(() => Math.random() - Math.random()).slice(0, n)
array.sort(() => Math.random() - Math.random()).slice(0, n)