JavaScript

The language of the web, interactive sites and apps

Learn JavaScript from scratch: from variables, conditions, loops and functions to arrays, objects, the DOM, asynchronous code, classes and modules. In every lesson you run the code right in your browser and see the result at once. By the end of the course you will be able to write your own programs that work with data and make web pages interactive.

  • Beginner
  • Intermediate
  • Advanced
lessons
39
modules
8
tests
14
hours of lessons
13.2

Course content

8 modules, 39 lessons. Each module has its own level, and the lessons follow in order.

  1. JavaScript basics

    Beginner5 lessons · 71 min

    Write your first program and learn variables, data types, operators and working with strings.

    1. 1What is JavaScript? Your first programFind out what JavaScript is and where it runs, and write your first program with `console.log`.10 min
    2. 2Variables and data typesLearn to create variables with `let` and `const`, name them well and recognise JavaScript's basic data types.12 min
    3. 3Operators and type coercionLearn arithmetic, comparison and logical operators, and understand why `'5' + 3` gives `'53'`.14 min
    4. 4Numbers and the Math objectOne `number` type and floating point (0.1 + 0.2), Number.EPSILON, safe integers and BigInt, Number/parseInt/parseFloat, NaN, rounding traps, Math methods and random integers in a range.22 min
    5. 5Strings and template literalsLearn to work with text: accessing characters, useful methods and template literals that put variables into text with ease.13 min
  2. Conditions, loops and functions

    Beginner3 lessons · 42 min

    Teach your program to make decisions, repeat work and split code into reusable functions.

    1. 6Conditions: if, else and switchTeach your program to make decisions: `if`, `else if`, `else`, the ternary operator and `switch`.13 min
    2. 7Loops: for, while and for...ofLearn to repeat work many times: `for`, `while`, `do...while`, `for...of`, plus `break` and `continue`.14 min
    3. 8Functions and arrow functionsSplit code into reusable pieces: declaring functions, parameters, `return`, default values, arrow functions and scope.15 min
  3. Data and the browser

    Intermediate6 lessons · 113 min

    Manage data with arrays, objects and JSON, catch errors and bring pages to life through the DOM.

    1. 9Arrays and array methodsLearn to work with lists: adding and removing items, and transforming data with `map`, `filter`, `find` and `reduce`.16 min
    2. 10Objects, destructuring and spreadKeep all the properties of one thing together in an object, unpack them with destructuring, and copy and merge with `...`.17 min
    3. 11Map and SetMap, a dictionary with keys of any type, and Set, a collection of unique values: iteration, conversions, set operations, WeakMap and WeakSet, and the counting, deduplication and grouping patterns.22 min
    4. 12JSON and error handlingSend and receive data in JSON format, and catch errors with `try...catch` so your program doesn't crash.15 min
    5. 13Dates and times: Date and IntlTimestamps, months from zero, time zones and parsing, calculating with dates; Intl for dates, money, relative time, plural forms and sorting in az, en, ru and tr; the status of Temporal.25 min
    6. 14The DOM and eventsControl a page with JavaScript: find elements, change them, create new ones and respond to clicks and typing.18 min
  4. Browser APIs

    Intermediate3 lessons · 71 min

    What the browser gives you out of the box: storing data, validating forms and drawing on a canvas.

    1. 15Storing data in the browser: localStorage and cookieslocalStorage and sessionStorage with JSON, limits and errors, the storage event, cookies and their attributes, an IndexedDB overview, what never to store, and a to-do list that survives reloads.22 min
    2. 16Forms and validation with JavaScriptReading form values, the input, change and submit events, preventDefault, FormData, the Constraint Validation API (checkValidity, setCustomValidity, validity), accessible error messages and preventing double submits.24 min
    3. 17Drawing with Canvas 2DThe canvas element and its 2D context, the coordinate system, rectangles, paths and arcs, colours and gradients, text and images, save/restore and transforms, animation with requestAnimationFrame, a drawing pad, and a bar chart that stays sharp on high-density screens.25 min
  5. Modern JavaScript

    Advanced3 lessons · 54 min

    Get to know asynchronous code, classes, modules and the tools professional developers use.

    1. 18Asynchronous JavaScript: callbacks, promises, async/awaitLearn to do work that involves waiting without freezing the program: `setTimeout`, callbacks, promises and `async`/`await`.20 min
    2. 19Classes and inheritanceCreate objects with the same structure using classes: constructors, methods, inheritance with `extends`, private fields, getters and static methods.18 min
    3. 20Modules and modern toolingSplit code into files with `import` and `export`, add packages with npm and meet the tools professionals use: Vite, ESLint, Prettier.16 min
  6. JavaScript in depth

    Advanced8 lessons · 172 min

    Learn how the language works inside: closures, prototypes, the event loop, generators, functional style, errors, regular expressions and performance.

    1. 21Scope and closuresUnderstand how JavaScript finds variables: lexical scope, closures, IIFE and the module pattern, plus `this`, `bind`, `call` and `apply`.22 min
    2. 22Prototypes and inheritanceSee what really happens behind `class`: the prototype chain, `Object.create`, constructor functions and why classes are called syntactic sugar.20 min
    3. 23The event loop and concurrencyLook inside the engine: the call stack, the task queue and the microtask queue. Learn to predict the exact order of `setTimeout`, promises and `await`.22 min
    4. 24Iterators, generators and symbolsFind out what makes `for...of` and spread work: the iteration protocol, `Symbol.iterator`, generator functions with `yield`, lazy sequences and symbols as unique keys.20 min
    5. 25Functional programmingWrite predictable code: pure functions, immutability, higher-order functions, currying, composition and powerful `reduce` patterns.22 min
    6. 26Error handling and debuggingGo beyond `try...catch`: built-in error types, custom error classes with `cause`, reading stack traces, the `debugger` statement and console methods that make bugs easy to find.22 min
    7. 27Regular expressionsSearch, validate and transform text with regular expressions: character classes, quantifiers, anchors, groups, flags and the `test`, `match`, `matchAll` and `replace` methods.22 min
    8. 28Performance and memoryMake code fast and lean: the Big-O cost of array, `Map` and `Set` operations, debounce and throttle, memoisation, garbage collection and memory leaks.22 min
  7. Professional JavaScript

    Advanced5 lessons · 116 min

    Node.js, REST APIs, React, testing and security, the tools and habits you need for real projects.

    1. 29Node.js basicsRun JavaScript outside the browser: the Node.js runtime, CommonJS and ES modules, npm and `package.json`, and working with files through `fs` and `path`.22 min
    2. 30fetch and REST APIsTalk to servers: how HTTP works, REST resources and methods, `fetch` with JSON, status codes, error handling, timeouts with `AbortController` and parallel requests.24 min
    3. 31React fundamentalsBuild interfaces from components: JSX, props, state with `useState`, side effects with `useEffect` and lists with keys, the core ideas of the most popular UI library.24 min
    4. 32Testing JavaScriptProve that your code works: unit tests with Vitest and Jest, `describe`/`it`/`expect`, the main matchers, testing async code and errors, mocks and spies, and what coverage really means.22 min
    5. 33Security and best practicesProtect users and code: XSS and CSRF, input validation, keeping secrets out of the browser, ESLint and Prettier, and moving to TypeScript step by step.24 min
  8. Node.js in depth

    Advanced6 lessons · 150 min

    Files and streams, events and CLI tools, HTTP servers, Express, databases and authentication.

    1. 34Node.js: the file system and streamsWorking with files in Node.js: `fs/promises` for reading, writing and folders, portable paths with `node:path`, error codes such as `ENOENT`, and streams, `pipeline`, gzip and reading a big log file line by line with `readline`.25 min
    2. 35Node.js: events, process and command-line tools`EventEmitter` and custom events, `process.argv` and `util.parseArgs`, environment variables and `--env-file`, exit codes, stdin/stdout, the Node.js event loop, signals, `child_process` and a small CLI tool installable with npm.25 min
    3. 36Node.js: a web server with the http moduleA server with nothing but the built-in `node:http`: `createServer`, the request and response objects, routing by method and URL, reading a JSON body from the stream, status codes and headers, serving static files safely (path traversal) and why frameworks exist.25 min
    4. 37A web server with ExpressA REST API with Express 5: routes and HTTP methods, route and query parameters, JSON bodies, the middleware chain (logging, `express.json`, `express.static`), handling errors in one place, `Router` and a CRUD API for notes tested with `fetch`.25 min
    5. 38Express with a databaseThe notes API moves to SQLite: the built-in `node:sqlite` (`DatabaseSync`) with prepared statements, SQL injection and parameters, migrations as SQL files, routes → service → repository layers, validation, pagination, mapping database errors to HTTP statuses and ORMs in brief.25 min
    6. 39Authentication in Node: sessions, passwords and JWTHashing passwords slowly and with salt using `crypto.scrypt`, cookie sessions and JWTs, `HttpOnly`/`Secure`/`SameSite` cookies, login and logout routes in Express, middleware that protects routes, refresh tokens and their risks, rate-limiting the login and typical security mistakes.25 min