DEV Community 👩‍💻👨‍💻

Discussion on: Your Essential Guide To Map Built-in Object In Javascript

toastking profile image
Matt Del Signore

Another good reason to use Map (as long as you're not serializing anything) is you don't need to worry about someone extending the prototype to add keys. With Objects you could theoretically get a key clash if someone extends the object.

ayabouchiha profile image
Aya Bouchiha Author

Thank you for sharing with us this information 😊