What is a closure, in plain terms?

Ask Question
Asked 1 days agoViewed 2.0k times
23

I keep hearing the word but the textbook definitions confuse me. Can someone explain it without jargon?

1 Answer

  • Accepted answer

    A closure is a function bundled with the variables it captured from its defining scope. The function keeps access to them even after that scope returns.

    MW
    answered 1 days agoMarcus Webb7,334

Your Answer