I have this simple array:
var RedirUrl = new Array(4); RedirUrl[0] = 'http://mafi.se/mf_redir/new_install_'+this_version+'.html'; RedirUrl[1] = 'http://ifurls.com/mf_redir/new_install_'+this_version+'.html'; RedirUrl[2] = 'http://ez.se/xml-update/mf_redir/new_install_'+this_version+'.html'; RedirUrl[3] = 'http://ilovre.net/mf_redir/new_install_'+this_version+'.html'; RedirUrl[4] = 'http://rihel.com/mf_redir/new_install_'+this_version+'.html'; and then
RedirUrl.sort(function() {return 0.5 - Math.random()}) The last bit is what is confusing me. I understand the "sort" and I understand the Math.random but the return 0.5 confuses me... what exactly is that?
(Needless to say I downloaded it off the net as it does what i want it to do... but i just dont understand it.)