DEV Community

Cover image for 🤫 Secret JavaScript Methods They Don't Want You To See (part 1)

🤫 Secret JavaScript Methods They Don't Want You To See (part 1)

Dominic Magnifico on November 17, 2023

It baffles me every time I run into a JavaScript method I haven't encountered in my 10+ years as a web developer. I only very recently ran into the...
Collapse
 
oculus42 profile image
Samuel Rouse

Thanks for calling out this new feature! It was not something I had seen, yet and it has some great potential uses!

Object.groupBy and Map.groupBy are not yet part of the specification, but you can check out the TC39 GroupBy proposal for more details. At Stage 3, it looks like it will likely make its way into ES2024.

It's not currently supported in all browsers, as it was only added to Chrome in September and Firefox last month. Clicking the browser versions in the MDN Browser Compatibility table will tell you when that version was released.

Collapse
 
magnificode profile image
Dominic Magnifico

Excellent note for sure!

These days browser vendors seem pretty quick to adopt solid proposals like this, but absolutely pertinent information to know before implementing. I'll add this as a note to the post as well!

Collapse
 
devdufutur profile image
Rudy Nappée

Great article, but the title... Seriously ?

Collapse
 
magnificode profile image
Dominic Magnifico

Mostly just thought it was silly 😂. Appreciate you reading the post!

Collapse
 
xiaowo profile image
xiaowo

nice Article

Collapse
 
magnificode profile image
Dominic Magnifico

Thanks so much!