Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Name the mechanism by which a function retains access to variables from its defining scope after that outer call finishes." on CodeWiki (https://codewiki.com/practice/fill/javascript/checkpoint-2/checkpoint-2-closure-term/).
Context (verbatim from the page):
"""
Name the mechanism by which a function retains access to variables from its defining scope after that outer call finishes.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in JavaScript. Where you are unsure, say so.