Skip to main content
eLearner.app

Interactive course

JavaScript Course

Learn JavaScript from scratch, in English, with an engine that runs your code directly in the browser.

01 · Language basics

4 lessons

The foundations: declaring variables, recognizing types, doing arithmetic and making decisions.

  1. 1.1Variables: let and constDeclaring values, choosing between const and let, understanding basic scope.~8 min
  2. 1.2Primitive typesstring, number, boolean, null, undefined: the building blocks of the language.~8 min
  3. 1.3OperatorsArithmetic, comparison, boolean logic and operator precedence.~10 min
  4. 1.4Conditionals: if, else, ternaryRun different code depending on the value of an expression.~10 min

02 · Strings and numbers

4 lessons

The two most used types: composing text with template literals, manipulating it with string methods, doing arithmetic with numbers and Math.

  1. 2.1Strings and template literalsQuotes, escapes, backticks and `${...}` interpolation to compose text.~8 min
  2. 2.2String methodslength, toUpperCase, includes, slice, split, replace: the methods you use every day.~10 min
  3. 2.3Numbers and MathIntegers and decimals, rounding, Math.min/max/round/floor/ceil, Math.random.~10 min
  4. 2.4Type conversionsNumber, String, parseInt, parseFloat, toFixed and when NaN bites you.~8 min

03 · Arrays and objects

4 lessons

The two data structures you will use the most: ordered lists (arrays) and key-value maps (objects).

  1. 3.1Arrays: the ordered listCreating an array, read/write by index, push/pop/shift/unshift, length.~10 min
  2. 3.2Objects: the key-value mapLiterals, dot and bracket access, adding/removing properties.~10 min
  3. 3.3Destructuring and spreadExtract multiple values in one line; copy and merge arrays and objects with `...`.~12 min
  4. 3.4Iterating over collectionsfor…of on arrays, for…in on objects, Object.keys/values/entries.~10 min

04 · Functions

4 lessons

Break your programs into reusable pieces: declare them, write them compactly with arrows, pass flexible parameters and understand closures.

  1. 4.1Declaring a functionfunction declaration vs function expression, parameters, return.~10 min
  2. 4.2Arrow functionCompact `=>` syntax, concise body vs block, implicit return.~10 min
  3. 4.3Default and rest parametersDefault values, `...rest` for variable argument counts, spread at call site.~12 min
  4. 4.4Closures and scopeFunctions that remember their environment: counters, factories, scope chain.~12 min

05 · Control flow

4 lessons

Repeat, jump, handle errors: the constructs that give your code the ability to react to data and problems.

  1. 5.1Loops: for and whileclassic for, while, do…while: repeat until a condition.~10 min
  2. 5.2for…of and for…inIterate values of a collection vs keys of an object. When to use which.~10 min
  3. 5.3break and continueExit a loop early, or jump to the next iteration.~10 min
  4. 5.4try / catch / throwRaise and catch errors, separate normal flow from exceptional flow.~12 min

06 · Functional array methods

4 lessons

The methods that transform arrays: map to change every element, filter to select, reduce to aggregate, find/some/every to search, sort to order.

  1. 6.1map and filterTransform every element (map) and select a subset (filter).~10 min
  2. 6.2reduceAggregate an array into a single value: sums, counts, maps.~12 min
  3. 6.3find, some, everyFind the first one, check whether at least one or all satisfy a predicate.~10 min
  4. 6.4sortSort an array with a comparator; stable sort, copying via toSorted.~12 min

07 · Asynchronous

4 lessons

Code that waits: Promises, async/await, simulated network calls (fetch) and asynchronous error handling.

  1. 7.1Promises: what they arepending/fulfilled/rejected state, .then/.catch, Promise.resolve and reject.~12 min
  2. 7.2async / awaitWrite asynchronous code that reads like synchronous code.~12 min
  3. 7.3fetch (simulated)Call an endpoint, read JSON, compose results with Promise.all.~14 min
  4. 7.4Errors in asynchronous codetry/catch around await, .catch on Promises, failures in Promise.all.~12 min

08 · Practice and composition

4 lessons

Put all the pieces together: organize code in modules, parse a CSV, validate input data and schedule tasks with Promises.

  1. 8.1ESM modules: import / exportSplit code into files and compose libraries with export and import (concept).~12 min
  2. 8.2Challenge: CSV parserTurn a CSV string into an array of objects using split, map and destructuring.~15 min
  3. 8.3Challenge: data validatorValidate objects with composable rules and collect all the errors.~15 min
  4. 8.4Challenge: scheduling with PromisesRun tasks in series, in parallel and with a concurrency limit.~15 min