A structured collection of code, notes, and mini-projects written while learning JavaScript from the ground up — from variables and data types all the way to closures, prototypes, and OOP.
| Folder | Topics Covered |
|---|---|
01-basics |
Variables (let, const, var), data types, type conversion, operators, comparisons, strings, numbers & math, dates |
02-basics |
Arrays and array methods, objects, object destructuring |
03-basics |
Functions, scopes, arrow functions, IIFE (Immediately Invoked Function Expressions) |
04-control-flow |
if/else, switch statements, truthy & falsy values |
05-iterations |
Loops — for, while, do-while, for...of, for...in, forEach, map, filter, reduce |
06-dom |
DOM introduction, selecting & manipulating elements, creating and editing nodes |
07-projects |
DOM-based mini projects (see below) |
08-events |
Event listeners, event propagation, setTimeout & setInterval |
09-advance-one |
Promises, async/await, fetch, XMLHttpRequest & API handling |
10-classes-and-oop |
OOP in JavaScript — constructor functions, prototypes, ES6 classes, inheritance, static properties, call/bind, getters & setters, property descriptors |
11-closure-lexical-scope |
Lexical scoping and closures with practical examples |
Hands-on DOM projects built along the way (07-projects):
- Color Switcher — change page background on button click
- BMI Calculator — form handling with input validation
- Digital Clock — live clock using
setInterval - Guess the Number — game with state, validation & replay logic
- Keyboard Event Tracker — displays key, keycode & code on keypress
- Random Color Generator — start/stop background color changes with intervals
.jsfiles — run with Node.js:node 01-basics/01-variables.js
.htmlfiles — open directly in a browser and check the console (DevTools → Console).
Several folders include markdown notes (notes.md, Object-notes.md) summarizing key concepts like the event loop, prototypal inheritance, and closures — written in my own words for quick revision.
Learned by following the Chai aur Code JavaScript series by Hitesh Choudhary.
This repository is a living document of my JavaScript learning — expect it to grow as I do.