Skip to content

arvind00A/JavaScript

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 sequence
for f in projects/*.js; do echo "--- $f ---"; node "$f"; done

πŸ“š Section Reference

# Section Key Topics Run
01 πŸ”° Introduction & Setup JS engine, Node.js, console, debugging node projects/01-introduction-setup.js
02 🧠 Variables & Data Types var/let/const, 7 primitives, stack vs heap node projects/02-variables-data-types.js
03 πŸ”„ Type Conversion Coercion, truthy/falsy, == vs === node projects/03-type-conversion-comparison.js
04 βž• Operators Arithmetic, logical, ??. ?., bitwise node projects/04-operators.js
05 πŸ” Control Flow if/else, switch, ternary, guard clauses node projects/05-control-flow.js
06 πŸ”‚ Loops for, while, for..of, for..in, iterators node projects/06-loops-iterations.js
07 🧩 Functions Declaration, arrow, closures, curry, HOF node projects/07-functions.js
08 πŸ“¦ Execution Context Call stack, scope chain, hoisting node projects/08-execution-context-scope.js
09 🧱 Arrays map/filter/reduce, flat, sort, iterators node projects/09-arrays.js
10 πŸ—οΈ Objects Destructuring, spread, Proxy, descriptors node projects/10-objects.js
11 πŸ“š Strings, Numbers, Date Methods, regex, Math, Intl, Date ops node projects/11-strings-numbers-date.js
12 🌐 DOM Select, manipulate, create, delete elements node projects/12-dom.js (+ open HTML in browser)
13 πŸ–±οΈ Events Listeners, bubbling, delegation, custom EventEmitter node projects/13-events.js
14 πŸ”— Advanced Concepts this, call/apply/bind, closures, IIFE node projects/14-advanced-concepts.js
15 🧬 OOP Classes, inheritance, mixins, abstract, patterns node projects/15-oop.js
16 πŸ§ͺ Prototypes Prototype chain, Object.create, descriptors node projects/16-prototypes.js
17 ⏳ Async JavaScript Callbacks, Promises, async/await, queues node projects/17-async-javascript.js
18 🌍 API & Networking fetch, CRUD, caching, streaming, abort node projects/18-api-networking.js
19 βš™οΈ ES6+ Features Map/Set, Symbols, Generators, Proxy, tagged templates node projects/19-es6-features.js
20 🧩 Modules ESM, CommonJS, patterns, DI container, plugins node projects/20-modules-code-organization.js
21 🎯 Projects To-Do CLI, Quiz, Budget Tracker, Text Analyser, Redux node projects/21-projects.js
22 πŸš€ Bonus / Advanced Event loop, V8, memory, clean code, performance node projects/22-bonus-advanced.js

🎯 Interview Quick-Reference

Most-Asked JavaScript Interview Questions

Variables & Types

// typeof gotchas
typeof null        // "object" ← famous bug!
typeof []          // "object" β€” use Array.isArray()
typeof NaN         // "number" β€” NaN is type number!
NaN === NaN        // false β€” use Number.isNaN()

// == vs ===
null == undefined  // true  (only case!)
null === undefined // false
0 == ""            // true  (coercion)
[] == false        // true  (coercion)

Closures

function makeCounter() {
  let count = 0;
  return () => ++count; // closes over count
}
const counter = makeCounter();
counter(); // 1
counter(); // 2

var/let/const in loops

// ❌ Bug β€” all 3 (var leaks)
for (var i = 0; i < 3; i++) setTimeout(() => console.log(i), 0); // 3 3 3
// βœ… Fix β€” let creates new binding per iteration
for (let i = 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

const obj = {
  name: "Alice",
  regular() {
    return this.name;
  }, // this = obj βœ…
  arrow: () => this.name, // this = outer scope ❌
};

Promises vs async/await

// Promise chain
fetch(url).then(r=>r.json()).then(data=>...).catch(err=>...);

// async/await (same thing, cleaner syntax)
async function load() {
  try {
    const data = await fetch(url).then(r=>r.json());
  } catch(err) { ... }
}

Prototype chain

// Every object β†’ prototype β†’ Object.prototype β†’ null
const arr = [];
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

Version Year Key Features
ES5 2009 strict mode, JSON, Array.forEach
ES6/ES2015 2015 let/const, arrow functions, classes, template literals, destructuring, Promises, modules
ES2016 2016 Array.includes, ** exponentiation
ES2017 2017 async/await, Object.entries/values, padStart/padEnd
ES2018 2018 Rest/spread for objects, Promise.finally, async iteration
ES2019 2019 Array.flat/flatMap, Object.fromEntries, optional catch binding
ES2020 2020 BigInt, optional chaining ?., nullish coalescing ??, Promise.allSettled
ES2021 2021 Promise.any, String.replaceAll, logical assignment ??= &&= ||=
ES2022 2022 Class fields #private, Array.at(), Object.hasOwn, top-level await
ES2023 2023 Array.findLast, Array.toSorted/toReversed/toSpliced (non-mutating)
ES2024 2024 Promise.withResolvers, Object.groupBy, Map.groupBy

πŸ› οΈ Recommended Tools

Tool Purpose Install
Node.js 20 LTS Run JS outside browser nodejs.org
VS Code Editor code.visualstudio.com
ESLint Code quality npm i -g eslint
Prettier Auto formatting npm i -g prettier
Nodemon Auto-restart on file change npm i -g nodemon
Vitest / Jest Testing npm i -D vitest
TypeScript Type safety npm i -g typescript

πŸ“– Further Reading


Happy coding! πŸŽ‰ β€” Built for the JavaScript Interview Roadmap series

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors