The Ian Atha Museum of Internet Curiosities
Published on

Closure

Authors
  • avatar
    Name
    Ian Atha
    Twitter
    @IanAtha
    Ian Atha is an Athens-based technologist, ex-OpenAI, building at the intersection of craft, code, and civic life.

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].

Ian Atha is an Athens-based technologist, ex-OpenAI, building at the intersection of craft, code, and civic life.