By Keith Connolly on December 10, 2012Get Reading
Take for example this code:
var arr = [4,3,2,1,0,10];
// Here's what it looks like! [0,1,10,2,3,4]
Not great, right?
All you need to do is pass this anonymous function in your sort.
//or if you want the order reversed...
I really like hearing from those who read my content, engauge with me via the comments on each post are by one of the many contact methods below.