JavaScript · Junior · Question 43 of 75

What is event delegation about?

Explanation

Instead of 1000 handlers on every table row, there's one on table that finds the target via event.target.closest('tr'). This saves memory and automatically works for elements added later. It relies on bubbling.

Further reading

Problem with a question

JavaScript · Junior · question 43

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz