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:

  1. Try from scratch.
  2. Write tests or sample inputs.
  3. Handle edge cases.
  4. Explain time and space complexity when relevant.
  5. Refactor only after it works.

Exercises included

These are common enough that every MERN developer should practice them.