title: Random select array item without duplicates without removing items (JavaScript)
body: <p>I have seen many questions concerning randomly selecting array items without repeating. However, most of them are answered by using the splice method. But this removes items. </p>
  
  <p>I have already selected my items randomly, but they are repeating. In my two functions I select from each randomly selected item two "sub-items". The two functions are not working together, I am looking for a way that it is possible to select two different randomly selected items, without repetition, and without removing them. Can one please help me out?</p>
  
  <p>(Using Adobe Edge Animate)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var xml_source = "series.xml";
  var initLoadScript = false;
  
  var items = [];
  var itemTitle1;
  var obj = new Object();
  var previousNumber = -1;
  
  loadXML();
  
  function loadXML() {
   $.ajax({
    type: "GET",
    url: xml_source,
    dataType: "xml",
    success: function(xml) {
  
     $(xml).find('sbs').find('channel').find('item').each(function() {
      items.push($(this));
     });
  
     itemOne();
     itemTwo();
    }
   });
  }
  
  function itemOne(){
   var randomNumber = Math.floor(Math.random()*14);
   var assignItem = randomNumber;
   console.log("random nummer 1: " + assignItem);
   sym.$("TitleText1").html(items[assignItem].find("author_name").text());
   sym.$("Image1").html("&lt;img src='"+items[assignItem].find('media\\:content, content').find('media\\:thumbnail, thumbnail').attr('url')+"' width='145'/&gt;");
  }
  
  function itemTwo(){
   var randomNumber = Math.floor(Math.random()*14);
   var assignItem = randomNumber;
   console.log("random nummer 2: " + assignItem);
   sym.$("TitleText2").html(items[assignItem].find("author_name").text());
   sym.$("Image2").html("&lt;img src='"+items[assignItem].find('media\\:content, content').find('media\\:thumbnail, thumbnail').attr('url')+"' width='145'/&gt;"); 
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Example of XML Structure:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;sbs version="1.0" xmlns:media="http://search.yahoo.com/mrss/"&gt;
   &lt;channel&gt;
    &lt;title&gt;Feed&lt;/title&gt;
    &lt;description&gt;Video&lt;/description&gt;
    &lt;link&gt;//www.URL.com&lt;/link&gt;
    &lt;lastBuildDate&gt;Fri&lt;/lastBuildDate&gt;
    &lt;pubDate&gt;Fri&lt;/pubDate&gt;
    &lt;ttl&gt;1&lt;/ttl&gt;
    
       
    &lt;item&gt;
     &lt;title&gt;title&lt;/title&gt;
     &lt;description&gt;aflevering&lt;/description&gt;
     &lt;link&gt;//www.google.com&lt;/link&gt;
     &lt;guid&gt;//www.google.com&lt;/guid&gt;
     &lt;formatname&gt;berg&lt;/formatname&gt;
     &lt;pubDate&gt;Wed&lt;/pubDate&gt;
  
      &lt;!-- oEmbed --&gt;
     &lt;oembed&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;type&gt;video&lt;/type&gt;
      &lt;provider_name&gt;provider&lt;/provider_name&gt;
      &lt;provider_url&gt;http://www.video.nl/url&lt;/provider_url&gt;
      &lt;width&gt;10&lt;/width&gt;
      &lt;height&gt;10&lt;/height&gt;
      &lt;title&gt;title1&lt;/title&gt;
      &lt;author_name&gt;author name&lt;/author_name&gt;
      &lt;author_url&gt;http://www.google.com/&lt;/author_url&gt;
     &lt;/oembed&gt;
  
      &lt;media:content
        url="http://google.com"
        type="text/html"
        medium="document"
        expression="full"
        height="10"
        width="10"
        lang="us"&gt;
        &lt;media:title type="plain"&gt;title&lt;/media:title&gt;
        &lt;media:description type="plain"&gt;title descr&lt;/media:description&gt;
        &lt;media:thumbnail url="http://google.com/tiger.jpg" width="10" height="10" /&gt;
       &lt;/media:content&gt;
  
    &lt;/item&gt;</code></pre>
  </div>
  </div>
  </p>