Tue29 Function: Array.sort() Posted on Aug 29, 2006 in Code, JavaScript | 0 comments This one-liner sorts a numerical javascript array. 12// replace ARRAY_NAME with the name of your array. ARRAY_NAME.sort(function(a,b) { return a-b; });
Recent Comments