Skip to content

Instantly share code, notes, and snippets.

@pvamshi
Created May 3, 2015 17:56
Show Gist options
  • Save pvamshi/f368f30c91868900cd66 to your computer and use it in GitHub Desktop.
Save pvamshi/f368f30c91868900cd66 to your computer and use it in GitHub Desktop.
Scope 4
var a = 2;
function abc(b) {
var c = 6;
return [function (e) {
var d = 7;
return a + b + c + d + e;
},
function (k) {
c = k;
}
];
}
var f = 3;
var g = 9;
var ex1 = abc(g);
console.log(ex1[0](f));
ex1[1](8);
console.log(ex1[0](f));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment