10
rated 0 times
[
16]
[
6]
/ answers: 1 / hits: 54471
/ 13 Years ago, mon, january 2, 2012, 12:00:00
I'm using Javascript sort
(with Underscore.js):
_.sortBy([Bob, Mary, Alice], function (name) {return name})
> [Alice, Bob, Mary]
I would like the array to return the other way. How do I do that?
[Mary, Bob, Alice]
I don't want to reverse it after it's sorted - I want it to be created the other way around the first time.
Thanks.
More From » sorting