A closure in JavaScript is a function that "remembers" its lexical environment (variables from the outer scope) in which it was created, even if its result is outside of it.