HackerEarth Frontend Engineer Interview Experience
Frontend Engineer
Summary
AI Powered
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.
1
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.
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.
Javascript
Event Propagation
Medium
Create a custom React hook that synchronizes a state value with localStorage. The hook should:
- Read the initial value from localStorage
- Keep React state and localStorage in sync
- Return the current value and a setter function
- Handle changes to the storage key correctly.
Create a custom React hook that synchronizes a state value with localStorage. The hook should:
- Read the initial value from localStorage
- Keep React state and localStorage in sync
- Return the current value and a setter function
- Handle changes to the storage key correctly.
React
Hooks
Hard
A
Anonymous
Anonymous User
⌘/Ctrl+D
Bookmark for later