Settings

Theme

Why in JavaScript doesn't Map have anything like .map, .reduce, etc.?

2 points by meeech 5 years ago · 3 comments · 1 min read


Just wondering if anyone has any insight (links?) or was involved in any of the discussions around Map() in JS. Was just wondering - it seems like the general methods - map, reduce, some, etc... - would have been useful on Maps as well, so i got curious why they weren't?

rauschma 5 years ago

IIRC, adding those operations was merely postponed, not rejected.

These are work-arounds: https://exploringjs.com/impatient-js/ch_maps.html#missing-ma...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection