fbpx

Describe the concept of event delegation in JavaScript.

  • Event delegation involves assigning a single event listener to a common ancestor.
  • Events are then handled based on their target within the ancestor, reducing the number of event listeners.
  • It improves performance and simplifies code maintenance.

# Dream job to realty