title: JavaScript getElementsByClassName: replace take radom 5 of 10 and shuffle
body: <p>I have:</p>
  <pre><code>&lt;div class=&quot;parent&quot;&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 1&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 2&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 3&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item ...&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 10&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want:</p>
  <pre><code>&lt;div class=&quot;parent&quot;&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 7&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 4&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 5&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 9&lt;/div&gt;
    &lt;div class=&quot;myItem&quot;&gt;Item 2&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I would like to replace a certain amount (for example 5 of 10) items. And the replaced items shuold be in a new, random order. In pure JavaScript. Whats the best way to do this?</p>