preventDefault vs stopPropagation
Two distinct event methods often confused: one cancels the browser's default action for an event, the other stops the event from traveling further through the DOM.
event.preventDefault() and event.stopPropagation() are both commonly called inside event handlers, but they do genuinely different things, and confusing them is one of the most common practical mistakes developers make with the DOM event system — which is exactly why interviewers like pairing them in a single question.
preventDefault() is like telling airport security 'don't let this specific passenger board the plane' — it stops one particular downstream consequence but doesn't stop word of the incident from spreading through the terminal (propagation). stopPropagation() is the opposite: it's like cutting the radio silence so nobody further down the chain of command even hears about the incident, but the passenger might still board the plane (default action) if nobody told security to stop them.