4 ms·
I like each better than for primarily for readability. However I usually use the each from underscore, and I'm not sure how well that one performs.
by samspot 13y ago
I like each better than for primarily for readability. However I usually use the each from underscore, and I'm not sure how well that one performs.
- ville 13y agoThe performance of _.each should be very close to that of the native Array#forEach because it delegates to the native method when it's available: https://github.com/jashkenas/underscore/blob/6db5b93eac3eacdbdf4a863e2d0443b484e81461/underscore.js#L76 https://github.com/jashkenas/underscore/blob/6db5b93eac3eacd...