Beginner JavaScript
Q7 / 100

What is event bubbling?

Correct! Well done.

Incorrect.

The correct answer is B) An event propagating from the target element up through its ancestors in the DOM

B

Correct Answer

An event propagating from the target element up through its ancestors in the DOM

Explanation

When you click a button, the click event bubbles up from the button to its parent, grandparent, and so on. Call event.stopPropagation() to prevent bubbling.

Progress
7/100