What does preventDefault() do on an event object?
- A Stops the event from bubbling to ancestors
- B Cancels the browser's default action for that event
- C Removes the event listener
- D Prevents other handlers from running
Answer
Cancels the browser's default action for that event
preventDefault stops the default behaviour such as following a link or submitting a form. stopPropagation is the separate method that halts bubbling.





