DEV Community

Discussion on: How to explain JavaScript Closure to a 5 years old kid

Collapse
 
drarig29 profile image
Corentin Girard

What would your solution for the __proto__ injection be? I didn't understand what you meant about new Map().

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

using a Map object instead of a plain JS object avoids the __proto__ problem