News for hackers. Stuff that matters.
Re:Software in 2014 by twerquie on Thursday January 09, 2014 @08:27AM (#7030306)
It can (and should!) be written more elegantly

[5, 10, 1].sort(function(a, b) { return a - b })

Or, in ES6:

[5, 10, 1].sort((a, b) => { a - b })

That's starting to look pretty nice if you ask me.

There are no comments on this comment yet.