title: Call random function Javascript, but not twice the same function
body: <p>I use a function that randomly selects another function, which works. 
  But sometimes it runs the same function twice or even more often in a row.</p>
  
  <p>Is there a way to prevend this?</p>
  
  <p>My current code:</p>
  
  <pre><code>window.setInterval(function(){
          var arr = [func1, func2, func3],
          rand = Math.floor(Math.random() * arr.length),
          randomFunction = arr[rand];
          randomFunction();
  }, 5000);
  </code></pre>
  
  <p>Pretty simple so far. But how do I prevent func1 (for example) to run twice in a row</p>