A closure is a function bundled with references to its surrounding lexical scope, retaining access to those variables after the outer function returns. Practical uses: data privacy (module pattern), function factories, and maintaining state in callbacks.
JavaScript· asked at Google✓ Added to review
💬
Send Feedback / Bug
Feedback Submitted!
Thank you. Your help keeps Geeky Script running smoothly.