SyntaxFix
Write A Post
Hire A Developer
Questions
A recursive solution:
function shuffle(a,b){ return a.length==0?b:function(c){ return shuffle(a,(b||[]).concat(c)); }(a.splice(Math.floor(Math.random()*a.length),1)); };