Question: Starting with some DOM elements in the nested structure below, you assign listeners for the same event to a child element and one of the parents using the JavaScript that follows. You want to ensure that when `.leaf` is clicked, only its event handler will be fired, instead of the click bubbling up and also firing the parent's click handler. What do you need to add to its handler function?
- `event.capture();`
- `event.stopPropagation();`
- `event.preventDefault();`
- `event.stop();`
Answer: The correct answer of the above question is Option B:`event.stopPropagation();`