JavaScript Course
Master the language of the web — 86 lessons from first script to advanced architecture.
Free JavaScript course from beginner to advanced — variables, functions and the DOM through closures, prototypes, the event loop, async/await and design…
Part of the free JavaScript course at LearnCodingFast — hands-on lessons with examples you run in your browser, plus practice exercises and a quick quiz.
What you'll learn
Prerequisites
None — this course starts from zero. A little familiarity with HTML and CSS helps but isn't required; you can pick up the essentials as you go. All you need is a web browser and a code editor.
Start with Lesson 1 and learn to build interactive websites step by step — at your own pace.
Lessons in this course
- Introduction to JavaScript — How JavaScript works in the browser and what you can build with it
- Variables and Data Types — var, let, const — how to store and update data in your programs
- Functions — Write reusable blocks of code that do one thing well
- Strings & String Methods — slice, split, replace, template literals and the string methods you'll use daily
- Numbers & Math — parseInt/parseFloat, toFixed, the Math object, and handling NaN
- Loops & Iteration — for, while, for…of and for…in — and break/continue
- Conditionals & Operators — if/else, switch, ternary, &&/||, plus ?? and ?. (optional chaining)
- Type Coercion (== vs ===) — == vs ===, truthy/falsy values, and avoiding coercion bugs
- Hoisting — How var and function declarations are 'lifted' — and why let/const aren't
- Scope & var/let/const (TDZ) — Block vs function scope, the temporal dead zone, and choosing let vs const
- The this Keyword — How this is determined, and call / apply / bind
- Destructuring Assignment — Pull values out of arrays and objects in one clean line
- Spread & Rest Operators — Copy, merge and gather with the ... operator
- map, filter & reduce — The three array methods every JS developer must master
- Map & Set — The ES6 key-value and unique-value collections — and when to use them
- Callbacks & Callback Hell — How callbacks work and why they led to Promises
- Iterators & Iterables — Symbol.iterator, for…of, and what makes something iterable
- Generators (function*, yield) — Pause and resume functions to produce values on demand
- Recursion & the Call Stack — When a function calls itself — and how the call stack tracks it
- Checkpoint: Core JavaScript — Review & combine the core concepts in a build challenge — then a quiz
- Checkpoint: Data & Logic — Combine strings, loops and conditionals in a build challenge — then a quiz
- DOM Manipulation — Select and change HTML elements directly from JavaScript
- Events — Respond to user clicks, keypresses, and form submissions
- Arrays and Objects — Store lists and structured data, and loop through them efficiently
- ES6+ Features — Arrow functions, destructuring, template literals, and modern JS syntax
- Async/Await — Write asynchronous code that's as readable as synchronous code
- Fetch API — Load data from external APIs and display it on your page
- Error Handling — Catch and handle errors with try/catch and graceful fallbacks
- Closures and Scope — Understand how functions remember variables from their outer scope
- Prototypes and Classes — Model real-world objects with JS classes and prototype inheritance
- Design Patterns — Apply classic patterns like Module, Observer, and Factory in JavaScript
- Performance Optimization — Profile and speed up JavaScript with proven optimisation techniques
- Deep Dive into JavaScript Execution Context & Call Stack — How JS engines execute code, create frames, and manage the call stack
- Advanced Scope, Closures & Lexical Environments — The full picture of scope chains, variable hoisting, and closure patterns
- Event Loop, Microtasks & Async Internals — How the event loop, task queue, and microtask queue work together
- Mastering Promises: Chaining, Error Flow & Patterns — Chain promises, handle errors correctly, and use Promise.all/race
- Async/Await Architecture & Best Practices — Patterns for concurrent requests, cancellation, and error recovery
- JavaScript Modules: ES6 Imports, Exports, Bundling — Split code into modules and understand how bundlers resolve imports
- Prototype Chain & Advanced OOP Patterns — Traverse the prototype chain and build mixins and composable objects
- Functional Programming in JavaScript — Write composable, predictable code with pure functions and immutability
- Higher-Order Functions & Currying — Pass, return, and partially apply functions to build powerful abstractions
- Pure Functions, Immutability & Side Effects — Write predictable code by controlling side effects and avoiding mutation
- JavaScript Memory Management & Garbage Collection — How V8 allocates and collects memory, and how to avoid leaks
- Deep Copy vs Shallow Copy & Data Structures — Clone objects safely and choose the right data structure for the job
- Advanced Array & Object Transformations — Master reduce, flat, flatMap, Object.entries, and complex transforms
- Custom Event Emitters & Observer Pattern — Build your own event system and implement the observer pattern from scratch
- Debouncing & Throttling for Performance — Limit how often event handlers fire to keep UIs fast and responsive
- DOM Reflow, Repaint & Browser Rendering Pipeline — How the browser converts HTML to pixels and how JS triggers reflows
- Virtual DOM Concepts & Efficient UI Updates — How frameworks like React use a virtual DOM to minimise real DOM changes
- Advanced Fetch API Patterns (Retry, Timeout, AbortController) — Handle timeouts, retries, and cancellation in production-grade fetch code
- Web Storage APIs (localStorage, sessionStorage, IndexedDB) — Persist data in the browser across sessions using storage APIs
- Building Custom APIs with Fetch & Async Logic — Design reusable API modules with auth, caching, and error handling built in
- Error Handling Patterns in Large JS Apps — Centralise error handling with boundaries, loggers, and fallback strategies
- Regular Expressions Advanced Techniques — Master lookaheads, named groups, and real-world regex patterns
- Working with Dates, Timezones & Intl API — Parse, format, and localise dates correctly across timezones
- JavaScript Design Patterns (Factory, Singleton, Strategy, etc.) — Apply advanced GoF patterns and architectural patterns to real JS apps
- Writing Maintainable & Scalable Code Architecture — Structure large codebases with clear boundaries, naming, and conventions
- Deep Dive into JSON, Parsing & Serialization — Parse, validate, transform, and safely serialise complex JSON data
- Client-Side Security Essentials (XSS, CSRF, Sanitisation) — Prevent the most common web security vulnerabilities in JS apps
- Working with WebSockets for Real-Time Features — Build live chat, notifications, and dashboards with WebSocket connections
- JavaScript Performance Optimization Techniques — Identify and fix slow JS with profiling, lazy loading, and code splitting
- Building Reusable UI Components with Pure JS — Create modular, accessible components without a framework
- Module Bundlers: Webpack, Parcel, Vite (Overview) — Understand how bundlers work and configure them for your project
- Intro to TypeScript & Strong Typing Concepts — Add static types to JavaScript with TypeScript and avoid runtime bugs
- Testing JavaScript with Jest & Mocha — Write unit tests, mocks, and assertions with Jest and Mocha
- Building Simple SPAs with Vanilla JavaScript — Build a single-page application with client-side routing and state
- Deploying JavaScript Apps (CDN, Minification, Bundling) — Optimise and ship JavaScript apps to production with confidence
- Template Literals & Tagged Templates — Interpolate and build strings with backticks, multiline text, and tag functions
- Optional Chaining & Nullish Coalescing — Safely access deep properties with ?. and provide defaults with ??
- Essential Array Methods — find, some, every, flat, at, and immutable toSorted/toReversed
- Object Methods (keys, entries, assign, freeze) — Iterate, copy, merge and lock objects with the built-in Object methods
- Symbols & Well-Known Symbols — Unique keys and customizing behavior with Symbol.iterator and friends
- Getters, Setters & Property Descriptors — Computed and validated properties with get/set and defineProperty
- Proxy & Reflect (Metaprogramming) — Intercept object operations with traps — the basis of modern reactivity
- BigInt & Number Precision — Work with integers beyond MAX_SAFE_INTEGER and avoid precision loss
- Checkpoint: Modern JavaScript — Combine modern syntax, methods and a Proxy in a build — then a quiz
- Promise Combinators (all, race, allSettled, any) — Coordinate multiple async operations and handle partial failures
- Async Iterators & for-await-of — Stream and paginate async data with async generators
- AbortController & Cancelling Async Work — Cancel fetches and timers cleanly with AbortController and signals
- Web Workers (Background Threads) — Run CPU-heavy work off the main thread to keep the UI responsive
- IntersectionObserver (Lazy Load & Infinite Scroll) — React to element visibility without slow scroll listeners
- MutationObserver (Watching the DOM) — Observe DOM changes — added nodes, attributes, and text
- IndexedDB (Client-Side Database) — Store large structured data in the browser with transactions and indexes
- The Canvas API — Draw shapes, paths, text and animations on a 2D canvas
- Checkpoint: Browser APIs — Combine promises, async iterators and a cache in a build — then a quiz
- Final Project Ideas — Guided project ideas to consolidate everything you've learned
- Web Components & Custom Elements — Build reusable, framework-agnostic elements with Custom Elements and Shadow DOM
- Service Workers & PWAs — Cache assets, work offline, and make installable progressive web apps
- WebAssembly & JS Interop — Run near-native compiled code and call between WebAssembly and JavaScript
- Advanced State Management — Stores, observers, immutable updates and reducers without a framework