This site runs best with JavaScript enabled.

JavaScript Closures

Photo by Erlend Ekseth

How JavaScript Closures work

The blog post that is now called JavaScript: Pass By Value Function Parameters used to be called JavaScript Closures, but I soon realized that I was not describing closures, but something else entirely. I resolved to retitle that one.

I was going to flesh this one out, and maybe I will one day. For now, you can read which is a great explanation to the concept.

Discuss on TwitterEdit post on GitHub

Share article
Kent C. Dodds

Kent C. Dodds is a JavaScript software engineer and teacher. He's taught hundreds of thousands of people how to make the world a better place with quality software development tools and practices. He lives with his wife and four kids in Utah.

Join the Newsletter

Kent C. Dodds