Skip to content

Latest commit

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🚀 JavaScript Roadmap — Complete Study Guide

22 sections · 22 cheat sheets · 22 project files · Beginner → Advanced


📁 Folder Structure

js-roadmap/
├── README.md ← You are here
├── / ← Theory + syntax reference (22 files)
│ ├── 01-introduction-setup.md
│ ├── 02-variables-data-types.md
│ ├── 03-type-conversion-comparison.md
│ ├── 04-operators.md
│ ├── 05-control-flow.md
│ ├── 06-loops-iterations.md
│ ├── 07-functions.md
│ ├── 08-execution-context-scope.md
│ ├── 09-arrays.md
│ ├── 10-objects.md
│ ├── 11-strings-numbers-date.md
│ ├── 12-dom.md
│ ├── 13-events.md
│ ├── 14-advanced-concepts.md
│ ├── 15-oop.md
│ ├── 16-prototypes.md
│ ├── 17-async-javascript.md
│ ├── 18-api-networking.md
│ ├── 19-es6-features.md
│ ├── 20-modules-code-organization.md
│ ├── 21-projects.md
│ └── 22-bonus-advanced.md
└── / ← Runnable practice files (22 files)
├── 01-introduction-setup.js
├── 02-variables-data-types.js
├── 03-type-conversion-comparison.js
├── 04-operators.js
├── 05-control-flow.js
├── 06-loops-iterations.js
├── 07-functions.js
├── 08-execution-context-scope.js
├── 09-arrays.js
├── 10-objects.js
├── 11-strings-numbers-date.js
├── 12-dom.js
├── 13-events.js
├── 14-advanced-concepts.js
├── 15-oop.js
├── 16-prototypes.js
├── 17-async-javascript.js
├── 18-api-networking.js
├── 19-es6-features.js
├── 20-modules-code-organization.js
├── 21-projects.js
└── 22-bonus-advanced.js

⚡ Quick Start

# Prerequisites
node --version # Need Node.js 18+ (for native fetch)
npm --version
# Run any project file
node projects/01-introduction-setup.js
node projects/09-arrays.js
node projects/17-async-javascript.js
# Run all project files in sequenceforfin projects/*.js;doecho"--- $f ---"; node "$f";done

📚 Section Reference

#SectionKey TopicsRun
01🔰 Introduction & SetupJS engine, Node.js, console, debuggingnode projects/01-introduction-setup.js
02🧠 Variables & Data Typesvar/let/const, 7 primitives, stack vs heapnode projects/02-variables-data-types.js
03🔄 Type ConversionCoercion, truthy/falsy, == vs ===node projects/03-type-conversion-comparison.js
04➕ OperatorsArithmetic, logical, ??. ?., bitwisenode projects/04-operators.js
05🔁 Control Flowif/else, switch, ternary, guard clausesnode projects/05-control-flow.js
06🔂 Loopsfor, while, for..of, for..in, iteratorsnode projects/06-loops-iterations.js
07🧩 FunctionsDeclaration, arrow, closures, curry, HOFnode projects/07-functions.js
08📦 Execution ContextCall stack, scope chain, hoistingnode projects/08-execution-context-scope.js
09🧱 Arraysmap/filter/reduce, flat, sort, iteratorsnode projects/09-arrays.js
10🏗️ ObjectsDestructuring, spread, Proxy, descriptorsnode projects/10-objects.js
11📚 Strings, Numbers, DateMethods, regex, Math, Intl, Date opsnode projects/11-strings-numbers-date.js
12🌐 DOMSelect, manipulate, create, delete elementsnode projects/12-dom.js (+ open HTML in browser)
13🖱️ EventsListeners, bubbling, delegation, custom EventEmitternode projects/13-events.js
14🔗 Advanced Conceptsthis, call/apply/bind, closures, IIFEnode projects/14-advanced-concepts.js
15🧬 OOPClasses, inheritance, mixins, abstract, patternsnode projects/15-oop.js
16🧪 PrototypesPrototype chain, Object.create, descriptorsnode projects/16-prototypes.js
17⏳ Async JavaScriptCallbacks, Promises, async/await, queuesnode projects/17-async-javascript.js
18🌍 API & Networkingfetch, CRUD, caching, streaming, abortnode projects/18-api-networking.js
19⚙️ ES6+ FeaturesMap/Set, Symbols, Generators, Proxy, tagged templatesnode projects/19-es6-features.js
20🧩 ModulesESM, CommonJS, patterns, DI container, pluginsnode projects/20-modules-code-organization.js
21🎯 ProjectsTo-Do CLI, Quiz, Budget Tracker, Text Analyser, Reduxnode projects/21-projects.js
22🚀 Bonus / AdvancedEvent loop, V8, memory, clean code, performancenode projects/22-bonus-advanced.js

🎯 Interview Quick-Reference

Most-Asked JavaScript Interview Questions

Variables & Types

// typeof gotchastypeofnull// "object" ← famous bug!typeof[]// "object" — use Array.isArray()typeofNaN// "number" — NaN is type number!NaN===NaN// false — use Number.isNaN()// == vs ===null==undefined// true (only case!)null===undefined// false0==""// true (coercion)[]==false// true (coercion)

Closures

functionmakeCounter(){letcount=0;return()=>++count;// closes over count}constcounter=makeCounter();counter();// 1counter();// 2

var/let/const in loops

// ❌ Bug — all 3 (var leaks)for(vari=0;i<3;i++)setTimeout(()=>console.log(i),0);// 3 3 3// ✅ Fix — let creates new binding per iterationfor(leti=0;i<3;i++)setTimeout(()=>console.log(i),0);// 0 1 2

Event Loop

console.log("1");setTimeout(()=>console.log("4"),0);Promise.resolve().then(()=>console.log("3"));console.log("2");// Output: 1 → 2 → 3 → 4// sync → microtask (Promise) → macrotask (setTimeout)

this Keyword

constobj={name: "Alice",regular(){returnthis.name;},// this = obj ✅arrow: ()=>this.name,// this = outer scope ❌};

Promises vs async/await

// Promise chainfetch(url).then(r=>r.json()).then(data=>...).catch(err=>...);// async/await (same thing, cleaner syntax)asyncfunctionload(){try{constdata=awaitfetch(url).then(r=>r.json());}catch(err){ ... }}

Prototype chain

// Every object → prototype → Object.prototype → nullconstarr=[];Object.getPrototypeOf(arr)===Array.prototype;// true// arr.push() found on Array.prototype via chain

🗺️ Learning Path

Beginner (Weeks 1–3)

  • Section 1 — Setup & Console
  • Section 2 — Variables & Types
  • Section 3 — Type Conversion
  • Section 4 — Operators
  • Section 5 — Control Flow
  • Section 6 — Loops

Intermediate (Weeks 4–6)

  • Section 7 — Functions
  • Section 8 — Execution Context
  • Section 9 — Arrays
  • Section 10 — Objects
  • Section 11 — Strings, Numbers, Date
  • Section 12 — DOM

Advanced (Weeks 7–10)

  • Section 13 — Events
  • Section 14 — Advanced Concepts (this, closures)
  • Section 15 — OOP
  • Section 16 — Prototypes
  • Section 17 — Async JavaScript
  • Section 18 — API & Networking

Expert (Weeks 11–12)

  • Section 19 — ES6+ Features
  • Section 20 — Modules
  • Section 21 — Projects
  • Section 22 — Bonus & Advanced Topics

📝 How to Study Each Section

  1. Read the cheat sheet (cheatsheets/NN-section-name.md)
  2. Run the project file and study the output
  3. Modify the examples — break things and fix them
  4. Build your own small project using the concepts
  5. Explain it out loud (Feynman technique)

🔥 ES Version Reference

VersionYearKey Features
ES52009strict mode, JSON, Array.forEach
ES6/ES20152015let/const, arrow functions, classes, template literals, destructuring, Promises, modules
ES20162016Array.includes, ** exponentiation
ES20172017async/await, Object.entries/values, padStart/padEnd
ES20182018Rest/spread for objects, Promise.finally, async iteration
ES20192019Array.flat/flatMap, Object.fromEntries, optional catch binding
ES20202020BigInt, optional chaining ?., nullish coalescing ??, Promise.allSettled
ES20212021Promise.any, String.replaceAll, logical assignment ??=&&=||=
ES20222022Class fields #private, Array.at(), Object.hasOwn, top-level await
ES20232023Array.findLast, Array.toSorted/toReversed/toSpliced (non-mutating)
ES20242024Promise.withResolvers, Object.groupBy, Map.groupBy

🛠️ Recommended Tools

ToolPurposeInstall
Node.js 20 LTSRun JS outside browsernodejs.org
VS CodeEditorcode.visualstudio.com
ESLintCode qualitynpm i -g eslint
PrettierAuto formattingnpm i -g prettier
NodemonAuto-restart on file changenpm i -g nodemon
Vitest / JestTestingnpm i -D vitest
TypeScriptType safetynpm i -g typescript

📖 Further Reading


Happy coding! 🎉 — Built for the JavaScript Interview Roadmap series

About

Comprehensive JavaScript study, cheat sheets, and runnable projects — covering fundamentals to advanced topics for interview prep and real-world coding.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages