Question: How does a function create a closure?

  1. It reloads the document whenever the value changes.
  2. It returns a reference to a variable in its parent scope.
  3. It completes execution without returning.
  4. It copies a local variable to the global scope.

Answer: The correct answer of the above question is Option B:It returns a reference to a variable in its parent scope.