Loading video...
Video Failed to Load
JavaScript Maps are super underrated. Keys of a map can be anything - including an object! Here I'm using the new groupBy proposed API to group array items into a Map or an Object →
240,399 views • 3 years ago •via X (Twitter)
11 Comments

Nick Taylor3 years ago
WeakMaps ftw as well!

Wes Bos3 years ago
Nothing better than something that cleans up

Paulo Reis3 years ago
I've been using the JavaScript Maps a lot, thanks for the teachings 💯

Wes Bos3 years ago
big fan!

zayenz 🐀3 years ago
Maps are great, but I really miss structural equality for the keys when they are objects, as that is so much more useful. Especially if the key is computed at lookup.

Wes Bos3 years ago
I agree, I wonder if we will ever get that in JS

Web-Dev-Codi3 years ago
YT comment: You should use a for loop for performance. Wes: I'm iterating over 3 things brotha. 🤣 This was hilarious

vovô ermitão3 years ago
except that it lacks a hashing function hook

Wes Bos3 years ago
@crudspecialist What would we use that for? Not snark, curious!

Rocky3 years ago
@wesbos where can we find this video or podcasts ? Really interested in it

Wes Bos3 years ago
This is it - I made it for twitter
