Interactive course
JavaScript Course
Learn JavaScript from scratch, in English, with an engine that runs your code directly in the browser.
01 · Language basics
The foundations: declaring variables, recognizing types, doing arithmetic and making decisions.
- 1.1Variables: let and constDeclaring values, choosing between const and let, understanding basic scope.~8 min
- 1.2Primitive typesstring, number, boolean, null, undefined: the building blocks of the language.~8 min
- 1.3OperatorsArithmetic, comparison, boolean logic and operator precedence.~10 min
- 1.4Conditionals: if, else, ternaryRun different code depending on the value of an expression.~10 min
02 · Strings and numbers
The two most used types: composing text with template literals, manipulating it with string methods, doing arithmetic with numbers and Math.
- 2.1Strings and template literalsQuotes, escapes, backticks and `${...}` interpolation to compose text.~8 min
- 2.2String methodslength, toUpperCase, includes, slice, split, replace: the methods you use every day.~10 min
- 2.3Numbers and MathIntegers and decimals, rounding, Math.min/max/round/floor/ceil, Math.random.~10 min
- 2.4Type conversionsNumber, String, parseInt, parseFloat, toFixed and when NaN bites you.~8 min
03 · Arrays and objects
The two data structures you will use the most: ordered lists (arrays) and key-value maps (objects).
- 3.1Arrays: the ordered listCreating an array, read/write by index, push/pop/shift/unshift, length.~10 min
- 3.2Objects: the key-value mapLiterals, dot and bracket access, adding/removing properties.~10 min
- 3.3Destructuring and spreadExtract multiple values in one line; copy and merge arrays and objects with `...`.~12 min
- 3.4Iterating over collectionsfor…of on arrays, for…in on objects, Object.keys/values/entries.~10 min
04 · Functions
Break your programs into reusable pieces: declare them, write them compactly with arrows, pass flexible parameters and understand closures.
- 4.1Declaring a functionfunction declaration vs function expression, parameters, return.~10 min
- 4.2Arrow functionCompact `=>` syntax, concise body vs block, implicit return.~10 min
- 4.3Default and rest parametersDefault values, `...rest` for variable argument counts, spread at call site.~12 min
- 4.4Closures and scopeFunctions that remember their environment: counters, factories, scope chain.~12 min
05 · Control flow
Repeat, jump, handle errors: the constructs that give your code the ability to react to data and problems.
- 5.1Loops: for and whileclassic for, while, do…while: repeat until a condition.~10 min
- 5.2for…of and for…inIterate values of a collection vs keys of an object. When to use which.~10 min
- 5.3break and continueExit a loop early, or jump to the next iteration.~10 min
- 5.4try / catch / throwRaise and catch errors, separate normal flow from exceptional flow.~12 min
06 · Functional array methods
The methods that transform arrays: map to change every element, filter to select, reduce to aggregate, find/some/every to search, sort to order.
- 6.1map and filterTransform every element (map) and select a subset (filter).~10 min
- 6.2reduceAggregate an array into a single value: sums, counts, maps.~12 min
- 6.3find, some, everyFind the first one, check whether at least one or all satisfy a predicate.~10 min
- 6.4sortSort an array with a comparator; stable sort, copying via toSorted.~12 min
07 · Asynchronous
Code that waits: Promises, async/await, simulated network calls (fetch) and asynchronous error handling.
- 7.1Promises: what they arepending/fulfilled/rejected state, .then/.catch, Promise.resolve and reject.~12 min
- 7.2async / awaitWrite asynchronous code that reads like synchronous code.~12 min
- 7.3fetch (simulated)Call an endpoint, read JSON, compose results with Promise.all.~14 min
- 7.4Errors in asynchronous codetry/catch around await, .catch on Promises, failures in Promise.all.~12 min
08 · Practice and composition
Put all the pieces together: organize code in modules, parse a CSV, validate input data and schedule tasks with Promises.
- 8.1ESM modules: import / exportSplit code into files and compose libraries with export and import (concept).~12 min
- 8.2Challenge: CSV parserTurn a CSV string into an array of objects using split, map and destructuring.~15 min
- 8.3Challenge: data validatorValidate objects with composable rules and collect all the errors.~15 min
- 8.4Challenge: scheduling with PromisesRun tasks in series, in parallel and with a concurrency limit.~15 min