MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/1v3e7eb/askjs_whats_a_javascript_feature_you_massadopted/oz9wcdv/?context=3
r/javascript • u/Capedcrusader1923 • Jul 22 '26
107 comments sorted by
View all comments
8
honestly... Map and WeakMap. took me a good 2 years after it came out for me to see the light.
Map
WeakMap
3 u/JazzXP Jul 23 '26 I'm still not using these, just objects/records. What's the advantage? 1 u/GulgPlayer Jul 23 '26 Apart from having cleaner (imo) code, Maps allow you to have non-string keys, which is nice, esp with TypeScript
3
I'm still not using these, just objects/records. What's the advantage?
1 u/GulgPlayer Jul 23 '26 Apart from having cleaner (imo) code, Maps allow you to have non-string keys, which is nice, esp with TypeScript
1
Apart from having cleaner (imo) code, Maps allow you to have non-string keys, which is nice, esp with TypeScript
8
u/HipHopHuman Jul 22 '26
honestly...
MapandWeakMap. took me a good 2 years after it came out for me to see the light.