HackerEarth
Frontend Engineer
Understanding 'this' in Callbacks
Medium
ROUND 1debuggingCandidate Not Selected
In the following object, why does this.name become undefined inside the forEach callback? Explain the value of this and fix the code without introducing any additional variables.
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.