JavaScript Coding Exercises
JavaScript coding rounds usually test small utilities.
The interviewer wants to see whether you understand arrays, functions, closures, async behavior, objects, and data structures.
How to use this branch
Do not only read the solutions.
For every exercise:
- Try from scratch.
- Write tests or sample inputs.
- Handle edge cases.
- Explain time and space complexity when relevant.
- Refactor only after it works.
Exercises included
- Polyfills:
map,filter,reduce. - Debounce and throttle.
- Flatten array and deep clone.
- Promise utilities.
- Event emitter and LRU cache.
These are common enough that every MERN developer should practice them.