Javascript - Closure and Scope

In this blog, I will create a small sample to demonstrate what Javascript closure and scoping is all about.
Let's take a look at the code:


The rules of closure are highlighted below