News for hackers. Stuff that matters.
Re:JavaScript Things I Wish I Knew Much Earlier In My Career by Tichy on Tuesday April 20, 2010 @12:17PM (#1279815)
The sorting approach to extracting the maximum element seems inefficient, especially as they mention Math.max as the next example. This seems to work, too:

Math.max.apply(Math,[3,5,1,7,9]);

Re:JavaScript Things I Wish I Knew Much Earlier In My Career by willwagner on Tuesday April 20, 2010 @01:33PM (#1280049)
I was just typing a similar comment when I saw yours. In general, learning how to use "apply" is a very useful technique for someone coming up to speed in Javascript.