DEV Community

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

Collapse
 
lionelrowe profile image
lionel-rowe

It may be a little confusing to beginners if the only example given is one where there's no advantage to using a closure (the information-hiding aspect would be better served with a module). Maybe you could expand the article or write a sequel, with a second example that shows off the power and usefulness of closures as a feature.

Thread Thread
 
papercoding22 profile image
Paper Coding • Edited

I am writing the next one, it will be more detailed and it will go with practical examples in real life project and open source. Thank for your suggestion