Prithvi Anantharaj
  • Home

Prithvi Anantharaj

Closures

3/7/2017

 
Inner functions having access to outer function's variables is called a closure. 

A Closure has three scope-chains, it has access to: 
  1. Its own scope
  2. The outer function's variables
  3. Global variables
Basic Closure Example: 

    

Comments are closed.

    Archives

    March 2017
    February 2017
    July 2016
    June 2016

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home