Closure

“A closure is the combination of a function and the lexical environment within which that function was declared.” https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures

Example

function makeFunc() {
  var name = 'Mozilla';
  function displayName() {
    alert(name);
  }
  return displayName;
}

var myFunc = makeFunc();
myFunc();

DisplayName maintains a reference to its lexical environment.