I was helping somebody out with his JavaScript code and my eyes were caught by a section that looked like that:
function randOrd(){ return (Math.round(Math
If you're using D3 there is a built-in shuffle function (using Fisher-Yates):
var days = ['Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi','Dimanche']; d3.shuffle(days);
And here is Mike going into details about it:
http://bost.ocks.org/mike/shuffle/