title: How to pull multiple items from one array without repeats in NodeJS?
body: <p>I'm currently working on a script that randomly generates loadouts for Mordhau.</p>
  <p>I'm not worried about it calculating point values at the moment, but I would like to make it so it doesn't repeat any selected perks.</p>
  <p>I have the perks in an array:</p>
  <pre><code>let perks = [&quot;Smith&quot;,&quot;Wrecker&quot;,&quot;Scavenger&quot;,&quot;Cat&quot;,&quot;Friendly&quot;,&quot;Tenacious&quot;]; //etc etc
  </code></pre>
  <p>And, admittedly my way of selecting them is pretty clunky but it gets the job mostly done.</p>
  <pre><code>let p1 = perks[Math.floor(Math.random()*(perks.length))]; //perk 1
  let p2 = perks[Math.floor(Math.random()*(perks.length))]; //perk 2
  let p3 = perks[Math.floor(Math.random()*(perks.length))]; //perk 3
  </code></pre>
  <p>Is there a way to assign these variables (p1, p2, p3) without any repeats from the items in the array &quot;perks&quot;?</p>
  <p>Thanks in advance!</p>