JavaScript
Program dynamic interactivity, DOM events, asynchronous operations, and modern web logic.
Fundamentals
6 minJavaScript is the programming language of the web, enabling interactivity, logic, and dynamic behavior in browsers (and beyond, via Node.js). This chapter covers how JS code is ...
Data Types
5 minJavaScript has two categories of data types: primitive types (stored by value) and reference types (stored by reference). Understanding type coercion and equality checking is es...
Operators
4 minOperators perform actions on values: arithmetic, comparison, logical, assignment, and more. ES6+ adds convenient operators like optional chaining and nullish coalescing.
Control Structures
5 minControl structures direct the flow of execution — deciding which code runs and how many times, via conditionals and loops.
Functions
5 minFunctions are reusable blocks of logic. Modern JS adds arrow functions, default/rest parameters, and closures — a powerful mechanism where a function "remembers" variables from ...
Arrays
5 minArrays store ordered lists of values. ES6+ provides powerful functional methods (map, filter, reduce) for transforming array data without manual loops.
Objects
5 minObjects store data as key-value pairs and are the core building block for structuring complex data in JavaScript, alongside methods for creating, copying, and inspecting them.
Strings
4 minStrings represent text. Modern JS provides template literals for readable string building plus a rich set of methods for searching, transforming, and splitting text.
DOM Introduction
4 minThe DOM (Document Object Model) is a live tree representation of an HTML page that JavaScript can read and modify — enabling dynamic content, styling, and structure changes with...
Events
5 minEvents let JavaScript respond to user interactions (clicks, typing, scrolling) or browser actions (page load). Understanding event bubbling and delegation is key to writing effi...
Forms & Inputs
4 minJavaScript can read, validate, and react to form input values in real time — essential for interactive forms, live validation, and custom submit handling.
Async JavaScript
6 minJavaScript is single-threaded but handles time-consuming tasks (network requests, timers) asynchronously via the event loop, Promises, and the more readable async/await syntax b...
JSON & Data
4 minJSON (JavaScript Object Notation) is a lightweight, text-based data format used to exchange data between a client and server. JS provides built-in methods to convert between JSO...
Error Handling
5 minError handling lets a program gracefully respond to unexpected failures — invalid input, failed network requests, or bugs — instead of crashing entirely. JavaScript uses try/cat...
Modules
5 minES Modules (ESM) let JavaScript code be split across multiple files, with explicit import/export statements controlling what's shared — improving organization, reusability, and ...
Browser Storage
5 minBrowsers offer client-side storage APIs — localStorage and sessionStorage — to persist data without a server, useful for saving preferences, cached data, or session state.
Timers
5 minTimers let JavaScript schedule code to run after a delay or repeatedly at intervals, powering things like debounced search, auto-save, slideshows, and countdowns.
Classes & OOP
6 minES6 classes provide a cleaner syntax for creating objects and implementing object-oriented patterns like inheritance and encapsulation, built on top of JavaScript's existing pro...