What is the most efficient way to select 2 unique random elements from an array (ie, make sure the same element is not selected twice).
I have so far:
It can be done using built-in functionality (slice and sort),
var n = 2 randomItems = array.sort(() => .5 - Math.random()).slice(0, n);