Fast JavaScript Max/Min

I’ve been saving this technique for a while now - it’s simple, but it’s good. What’s the fastest way to find the largest, or smallest, number in an array?

Link

[Via John Resig]

Leave a Comment