2 ms·
Some pedantry: > And JavaScript has always had a map method on arrays, which transforms the array's values into other values. This isn't true. We only officia
by bastawhiz 6y ago
Some pedantry:
> And JavaScript has always had a map method on arrays, which transforms the array's values into other values.
This isn't true. We only officially got this with ES5, which only came out in 2009. And we couldn't meaningfully use them until IE9 was released with ES5 support in 2011. And even then folks still had to support old IE for quite a while: it wasn't until around 2013 (after IE11's release) that ES5 use really picked up. Until then, we had Underscore.js and jQuerys' map methods, and various polyfills/shims.
Looking at the web today, you'd be forgiven for forgetting that most of the "cool" stuff is less than ten years old.
- simlevesque 6y agoI 'm far from old and I remember that time. For loops everywhere.
- gary_bernhardt 6y agoThanks, I updated the post. I've been using JS since the 90s so I'm not sure how I managed to forget that!