Computer ScienceIntroductory

Master JavaScript

The language, not the browser. Values and coercion, closures, prototypes, the one thread that drains two queues, and the rules behind every piece of JavaScript that looks strange until somebody states them plainly.

Contents

Master JavaScript

1

What JavaScript is, and how to run it

JavaScript's reputation for weirdness starts with a confusion about what it even is: a specification, an engine that implements it, and a host program that lends it everything else. This section separates those three, gets you running and inspecting code on this page and on your own machine, and teaches you to read a failure all the way down. Then it lays down the ground rules the rest of the course builds on: how a program is shaped, where semicolons appear without being written, the eight types, the two kinds of absence, and how a name comes to exist. It closes with the smallest set of tools that lets you write a program of your own.

0/19

Numbers, strings and text

Opens once you finish What JavaScript is, and how to run it, including its quiz.

locked

Coercion and equality

Opens once you finish Numbers, strings and text, including its quiz.

locked

Operators and control flow

Opens once you finish Coercion and equality, including its quiz.

locked

Functions, scope and closures

Opens once you finish Operators and control flow, including its quiz.

locked

Objects, references and `this`

Opens once you finish Functions, scope and closures, including its quiz.

locked

Prototypes, classes and metaprogramming

Opens once you finish Objects, references and `this`, including its quiz.

locked

Arrays, collections and iteration

Opens once you finish Prototypes, classes and metaprogramming, including its quiz.

locked

Errors, failure and debugging

Opens once you finish Arrays, collections and iteration, including its quiz.

locked

One thread: the event loop, memory and speed

Opens once you finish Errors, failure and debugging, including its quiz.

locked

Promises and async/await

Opens once you finish One thread: the event loop, memory and speed, including its quiz.

locked

Patterns, data formats, time and bytes

Opens once you finish Promises and async/await, including its quiz.

locked

Modules, packages and the JavaScript you inherit

Opens once you finish Patterns, data formats, time and bytes, including its quiz.

locked

Master JavaScript unit exam

Opens once every section is finished and every quiz is passed.