JS Buddy is a senior‑level JavaScript interview preparation repository focused on understanding semantics, not memorizing trivia.
The goal of this repo is to help experienced engineers validate (and sharpen) their mental model of JavaScript by solving well‑scoped exercises with executable tests that mirror real interview questions.
This is not a beginner tutorial. If you already know JavaScript syntax, this repo is about why things behave the way they do.
- Exercises are behavior‑driven, not output‑guessing.
- Tests are runnable with plain Node.js - no external libraries.
- Each exercise starts with intentionally incorrect or incomplete starter code.
- If all tests pass, you should be able to:
- explain the behavior clearly,
- implement it from scratch,
- and reason about edge cases in an interview.
This repository is now fully structured across all three levels:
- Basic (1-5)
- Intermediate (6-12)
- Advanced (13-22)
The Advanced track is complete and mapped in detail in Roadmap.md.
.
├── Roadmap.md
├── basic/
├── intermediate/
└── advanced/
📌 Roadmap.md
Defines all topics covered in Basic, Intermediate, and Advanced, grouped exactly as they appear in the repo.
📁 basic/
Covers JavaScript fundamentals that are often assumed but frequently misunderstood:
- 1. Language Fundamentals
- 2. Types & Coercion
- 3. Functions
- 4. Objects & Arrays
- 5. Asynchronous Basics
These exercises are not trivial, but they establish a precise baseline required for senior interviews.
Focuses on topics that separate mid‑level from senior engineers:
- 6. Scope & Closures
- 7. Execution Model
- 8. Prototypes & Inheritance
- 9.
thisBinding - 10. ES Modules
- 11. Error Handling
- 12. Data Structures in JS
Most real interview “gotchas” live here.
Advanced topics are broader, deeper, and now fully laid out in 10 modules:
- 13. JavaScript Engine Internals (V8-centric)
- 14. Memory Management & GC
- 15. Advanced Asynchronous Behavior
- 16. Concurrency & Parallelism
- 17. Performance Optimization
- 18. Metaprogramming
- 19. Security
- 20. Node.js Internals (Frequently Asked)
- 21. System Design with JavaScript
- 22. Language Design & Tradeoffs
- Node.js 18+ recommended
- No dependencies
- No test framework
From inside any exercise folder:
node ex1.test.jsor (for ES Modules):
node ex1.test.mjsIf the exercise is incomplete or incorrect, the test will throw. If it passes, it will print a success message.
Recommended workflow:
- Read the topic README inside the folder.
- Open the exercise file (
exN.js/exN.mjs). - Read the problem statement carefully.
- Run the test - expect failure.
- Implement the solution without changing tests.
- Re‑run until it passes.
- Be able to explain why it works.
If you can explain the solution clearly, you’re interview‑ready for that topic.
- Senior Software Engineers
- Backend / Full‑stack engineers
- Engineers preparing for system + language deep‑dive interviews
- Anyone who wants to replace “I know JS” with proof
- No frameworks
- No browser APIs
- No UI
- No shortcuts
- No trivia dumps
This repo optimizes for clarity of mental model, not coverage breadth.
Good luck, and if something feels uncomfortable while solving an exercise, that’s usually the point.