Skip to content

Instantly share code, notes, and snippets.

@dikshadhote
Created June 6, 2022 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dikshadhote/bddc0cf8eee5cbcc639b2116a43c9dba to your computer and use it in GitHub Desktop.
Save dikshadhote/bddc0cf8eee5cbcc639b2116a43c9dba to your computer and use it in GitHub Desktop.
lexical environment
function outerFunc(){
var a=7;
function innerFunc(){
console.log(a)
}
return innerFunc;
}
var output= outerFunc();
console.log(output);
output();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment