JavaScript Interview Question: What Is Event Delegation?
Short answer: event delegation means attaching one listener to a parent element instead of one per child. It works because most DOM events bubble up from the element where they happened through its ancestors. <ul id="todo-list"> <li data-id="1">Buy milk <butto...