How can i shuffle an array in JavaScript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2450954/how-to-randomize-a-javascript-array">How to randomize a javascript array?</a>  </p>
</blockquote>



<p>I want to shuffle an array of elements in JavaScript like these:</p>

<pre><code>[0, 3, 3] -&gt; [3, 0, 3]
[9, 3, 6, 0, 6] -&gt; [0, 3, 6, 9, 6]
[3, 3, 6, 0, 6] -&gt; [0, 3, 6, 3, 6]
</code></pre>
