Event delegation attaches a single listener to a common ancestor instead of many listeners on individual children. Events bubble up, and you inspect `event.target` to act on the originating element. It reduces memory use and works for dynamically-added elements.
JavaScript· asked at Meta✓ Added to review
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.