Examples of closures in JavaScript

added by JavaScript Kicks
9/25/2019 12:00:00 AM

1041 Views

The word closures make it sound complicated. You almost certainly understand closures already - let's take a look at some examples. // The `inner` function is said to have closure over the variable `a` In the above example, the inner function has access to the variable a, and hence inner is said to have closure over the variable a.


0 comments