Published on

Closure

Authors

Closure

A record of every reference a function utilizes.

Here's a small example in Javascript:

function example(x, y) {
	let sum = x + y;
	document.getElementById("span-for-result").innerHTML = sum.toString();
}

The closure of the example is [x, y, document].