News for hackers. Stuff that matters.
Re:Software in 2014 by i2 on Thursday January 09, 2014 @08:10AM (#7030212)
Except it is, because your code doesn't work:

  > [10, 1, 5, 1, 10, 10, 1, 5, 5, 5, 10].sort(byNum)
  > [10, 10, 5, 1, 10, 1, 1, 5, 5, 5, 10]
The right way is

  > function byNum(a, b) { return a - b; }
Re:Software in 2014 by ceautery on Thursday January 09, 2014 @09:15AM (#7030545)
A bug in my code doesn't make javascript horrible, it makes me horrible for rushing to illustrate a point instead of just harrumphing internally and finishing my coffee.

Good catch.