title: Randomized function: Prevent the previous result
body: <p>I have a function with a randomized result like that:</p>
  
  <pre><code> document.getElementById('recaller').addEventListener('click', function() {
              var randomIndex = Math.ceil((Math.random() * 10) % randomStrings.length - 1);
              newText1 = randomStrings[randomIndex];
              newText2 = randomStrings2[randomIndex];
              answer2.innerHTML = newText2;
          });
  </code></pre>
  
  <p>and the content from here:</p>
  
  <pre><code>var randomStrings2 = [
      "1",
      "2",
      "3",
      "4",
      "5"
  ];
  </code></pre>
  
  <p>Correctly, sometimes within the randomized function the result is the same within 2 "clicks". How can I prevent, that the previous result gets shown in the next clicks' try?</p>
  
  <p>To visualize I don't want that result: 1,1,2,2,1,3...</p>
  
  <p>But of course that result would be alright 1,2,3,1,2,4,5,1...</p>