2 ms·
Yeah, .forEach() is a new scope. But the better readability is worth the minor performance impact for everything but the most performance-intensive code.
by nailer 10y ago
Yeah, .forEach() is a new scope. But the better readability is worth the minor performance impact for everything but the most performance-intensive code.
- drenvuk 10y agoIt's that kind of thinking that gets us really slow software.
- nailer 10y ago"premature optimization is the root of all evil" - Don Knuth Also old-style for loops in JS fall victim to the last entry effect since people often use them to set up event handlers and wonder why they don't work.