What is a closure?
- A A function that has been closed and cannot be called
- B A function together with the lexical scope it was created in
- C A method for closing browser windows
- D A way to end a loop early
Answer
A function together with the lexical scope it was created in
The inner function retains access to the outer function's variables even after the outer function returns, which is how private state and hooks work.





