SyntaxFix
Write A Post
Hire A Developer
Questions
You can use a sort function :
var myarray=[25, 8, 7, 41] myarray.sort( function(a,b) { return b - a; } ); // 7 8 25 41
Look at http://www.javascriptkit.com/javatutors/arraysort.shtml