Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is a closure?

  1. A A function that has been closed and cannot be called
  2. B A function together with the lexical scope it was created in
  3. C A method for closing browser windows
  4. 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.

All Javascript MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as