Frontend Engineer
Nested Click Handlers and Event Order
Given the following nested elements and click handlers, what will be the output when clicking the inner element? Explain the order of execution for both event bubbling and event capturing, and modify the code to demonstrate both behaviors.
This question was asked in
HackerEarth Frontend Engineer Interview Experience
The HackerEarth interview process involved a single round and covered a broad range of topics related to CSS, JavaScript, and React. Candidates can expect questions focused on event handling, CSS layout properties, and the workings of React hooks and components. Overall, the interview presented a moderate difficulty level, challenging candidates to demonstrate both their technical knowledge and practical coding skills.