JavaScript: Basic to Advanced
From your first variable to the event loop, promises and OOP.
- modules
- 15
- topics
- 127
- exercises
- 346
- of practice
- 80 h 35 min
About this course
Learn JavaScript from zero to advanced, one practice step at a time: variables, conditions, loops, functions, arrays and objects, types and modern syntax, string and array methods, then how the engine runs your code (execution context, hoisting, scope), higher-order functions and closures, this/call/apply/bind, object creation, prototypes and inheritance, classes and OOP, the event loop, callbacks, promises and async/await, modules and generators, and a full interview-prep module. Every step runs in the browser with instant feedback.
What you'll learn
15 modules and 127 topics. Every topic has short lessons, a quiz, hands-on exercises checked in your browser, and interview questions.
1Variables, Data Types, Conditions & Loops
alert/prompt/confirm, variables, template literals, if/else, switch and loops.
- JavaScript in HTML file
- Accessing and Assigning
- Template literal
- alert, prompt, confirm
- Making Decision in Code
- Loops
- Assignment Level 2
- Assignment Level 3
- Assignment Level 4 — Phone Purchase
2Functions
Declarations, parameters, return values, arrow functions and default parameters.
- Function Basics
- Function Parameters
- Return Values & Type Conversion
- Default Parameters — Practice 1
- Default Parameters — Practice 2
3Arrays & Objects
Creating and accessing objects and arrays, reference vs value, and copying and cloning.
- Objects: Create & Access
- Objects: Dynamic Keys
- Array Basics
- Array Sum & Average
- Array of Objects: Movies
- Reference vs Value
- Combining & Transforming Arrays
- Output with Reason
- Arrays in Objects: GoT Houses
- Copying & Cloning
4Types, Operators & Modern Syntax
Primitive vs reference values, typeof, == vs ===, coercion, truthy and falsy, destructuring, spread and rest, optional chaining, ?? and Map/Set.
- Primitives vs References & typeof
- == vs ===, Coercion, Truthy/Falsy & NaN
- Destructuring: Arrays, Objects, Defaults & Nesting
- Spread & Rest
- Optional Chaining ?. & Nullish Coalescing ??
- Map & Set
- Types & Modern Syntax — assessment
5String Methods & Array Methods
Callbacks, string methods, map/filter/reduce/sort, and real datasets.
- Function Practice: Callbacks & Higher-Order Functions
- Getting to Know String Methods
- String Basics
- Getting to Know Array Methods
- Array Basics: Fruits
- String Methods Practice
- Array Methods Practice 1
- Array Methods Practice 2
- Visualise forEach (diagram)
- Array Methods on Words
- Persons (map/filter)
- Persons (reduce)
- GoT Data — Without reduce
- GoT Data — Only reduce
6Execution Context, Hoisting & Scope
How the engine runs your code: execution contexts and the call stack, the creation and execution phases, hoisting, var vs let vs const and the temporal dead zone, and the scope chain.
- Function Expressions & Arrow Functions
- Execution Context — Theory
- Execution Context Diagram 1
- Execution Context Diagram 2
- Execution Context Diagram 3
- Predict the Output (hoisting)
- Scope: var vs let vs const
- Scope Chain — Variable Lookup
- Rewrite Code the Way the Engine Reads It
7Higher-Order Functions & Closures
Callbacks and higher-order functions, writing your own map, forEach, filter and reduce, then closures: why a returned function keeps its variables, counters, private state and once().
- Callbacks
- Higher-Order Functions Properly
- Build Your Own map, forEach, filter
- Custom forEach, map, filter using reduce
- intersection() & union() with reduce
- Advanced Higher-Order Functions
- Closure — Execution Context Diagram
- Closure Counter — Diagram
- Closure Properly
- Closure Examples
- Closure Exercise
- once() & Callback Wrappers
8this, call, apply & bind
How this is decided, arrow functions, call, apply and bind, losing this in callbacks, and writing your own bind.
- The 4 Binding Rules of this
- Arrow Functions & Lexical this
- call & apply, Method Borrowing
- bind & Partial Application
- Losing this and How to Fix It
- Write Your Own myCall & myBind
- this, call, apply & bind — assessment
9Objects in Depth & Object Creation
Object literal features, getters and setters, property descriptors, factory functions, constructor functions and new, Object.create and the Object helpers.
- Object Literal Features: Shorthand, Computed Keys & Methods
- Getters, Setters, Property Descriptors & Object.freeze
- Factory Functions
- Constructor Functions & new
- Object.create & the Object Helpers
- Objects & Object Creation — assessment
10Prototypes & Inheritance
The prototype chain, prototype vs __proto__, Object.create inheritance, constructor inheritance, shadowing, hasOwn and instanceof.
- Prototypes & the Prototype Chain
- prototype vs __proto__ vs Object.getPrototypeOf
- Prototypal Inheritance with Object.create
- Constructor Inheritance
- Shadowing, Object.hasOwn, in & instanceof
- Prototypes & Inheritance — assessment
11Classes & OOP
Class syntax, fields, static and private members, getters and setters, extends and super, the four pillars of OOP, composition vs inheritance.
- Class Syntax, Constructor & Methods
- Fields, static & Private # Members
- Getters & Setters in Classes
- extends, super & Method Overriding
- The 4 Pillars of OOP
- Composition vs Inheritance & Mixins
- Classes Are Syntax Sugar over Prototypes
- Mini Project: A Bank System
- Classes & OOP — assessment
12The Event Loop
Single-threaded JavaScript, the call stack, Web APIs, the task queue, microtasks vs macrotasks, rendering, with step-through animations.
- Single-Threaded JavaScript & the Call Stack
- Web APIs, setTimeout & the Task Queue
- Microtasks vs Macrotasks
- Rendering, Long Tasks & Why the Page Freezes
- Predict-the-Order Drills
- Event Loop — assessment
13Callbacks, Promises & async/await
From callbacks to promises, chaining, error handling with try/catch, Promise combinators, async/await, sequential vs parallel work.
- Callbacks & Callback Hell
- Creating a Promise: States, resolve & reject
- then, catch, finally & Chaining
- Error Handling: throw, try/catch & Custom Errors
- Promise.all, allSettled, race & any
- async/await
- Sequential vs Parallel awaits
- Build Your Own promiseAll and promisify
- Fetching Data with fetch: Loading & Error States
- Async JavaScript — assessment
14Modules, Iterators & Generators
ES modules, iterators and Symbol.iterator, generators, JSON and structuredClone.
- ES Modules: import & export
- Iterators, for...of & Symbol.iterator
- Generators: function* & yield
- JSON & structuredClone
- Modern Extras — assessment
15JavaScript Interview Prep
Predict-the-output drills, classic polyfills to write yourself, and interview questions on OOP, prototypes and async.
- Predict the Output: Hoisting & TDZ
- Predict the Output: Closures
- Predict the Output: this
- Predict the Output: Event Loop Order
- Predict the Output: Type Coercion & Equality
- Polyfills I: map, filter, reduce
- Polyfills II: bind & Promise.all
- Polyfills III: debounce & throttle
- Polyfills IV: deep clone, flat, curry, memoize
- OOP & Prototypes Interview Questions
- Async Interview Questions
- Final Mock Interview