Skip to content

Instantly share code, notes, and snippets.

@aryak007
Last active March 26, 2018 18:28
Show Gist options
  • Select an option

  • Save aryak007/75b2c026c3a37c2e316ec529e0eb7519 to your computer and use it in GitHub Desktop.

Select an option

Save aryak007/75b2c026c3a37c2e316ec529e0eb7519 to your computer and use it in GitHub Desktop.
Closures First Example
function outer(){
var stark = "The king in the North, Jon Snow";
function inner(){
console.log(stark);
}
anotherFunction(inner);
}
function anotherFunction(inner){
inner(); //Q1. What is happening over here?
}
outer() //Q2. What will be the output?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment