Demystifying JavaScript Closures, Callbacks and IIFEs

There’s a difference between values and variables. Values don’t have scope; variables do. Getting a value outside of a function isn’t anything special. But accessing a variable after the point where it normally would have been destroyed is a trick made possible by closures.