4 ms·
JavaScript 1.6 added seven new array methods (indexOf, lastIndexOf, every, filter, forEach, map, and some). If only backward compatibility weren't a problem, t
by jgfoot 18y ago
JavaScript 1.6 added seven new array methods (indexOf, lastIndexOf, every, filter, forEach, map, and some). If only backward compatibility weren't a problem, the warring JavaScript libraries could just use these (or implement them into the prototype like Sugar Arrays, http://www.dustindiaz.com/sugar-arrays/ http://www.dustindiaz.com/sugar-arrays/) instead of creating their own quirky methods.