How can I make a random array with no repeats?
<p>I've been searching around for some answers to this issue, but nothing seems to work when I try to find a solution.</p>

<p>What I'm trying to achieve is to make a spinner in Javascript &amp; Adobe Edge that <strong>randomly spins on a number</strong>, and <strong>does not repeat that number</strong> again until all numbers have been spinned.</p>

<p>I know this should be fairly easy to do for a decent coder, but I'm not that experienced yet.</p>

<p>This is what I have so far, but it is unfinished and buggy:</p>

<pre><code>var myArray = ['360', '330', '300', '270', '240', '210', '180', '150', '120', '90', '60', '30'];
var Spinner1 = sym.$('Spinner1');

Spinner1.click(function(){
// randomize the degree of spin.
var mySpin = myArray[Math.floor(Math.random() * myArray.length)];

sym.getSymbol('Spinner1').play();
        Spinner1.css({
                    '-webkit-transform': 'rotate(' + mySpin + 'deg)',
                    '-moz-transform': 'rotate(' + mySpin + 'deg)',
                    '-ms-transform': 'rotate(' + mySpin + 'deg)',
                    '-o-transform': 'rotate(' + mySpin + 'deg)',
                    'transform': 'rotate(' + mySpin + 'deg)',
   });
   Spinner1.css('-webkit-transition','all 500ms cubic-bezier(0.420, 0.000, 1.000, 1.000)');

   if (mySpin &gt; 300 &amp;&amp; mySpin &lt; 360) {
   alert("Winner is number 1!");
   }
});
</code></pre>

<p>Hope someone could help me out. Thanks in advance.</p>