Question · JavaScript and TypeScript course · Module 12: Functional Programming
Closure
What is a closure in JavaScript?
Answer options
- A method that closes a database connection
- A function that remembers variables from the scope in which it was created
- A function enclosed in an ES6 module
- An object with closed (readonly) properties
You can check the correct answer by solving this task in the CodeWorlds game.