Early previewThis guide is in development. Items tagged verify are still being checked against official docs.
nebx Learn
GitHub
Menu
JS

JavaScript

The language of the web, on the client, the server and the edge.

Paradigm
Multi-paradigm, prototype-based, functional
Typing
Dynamic, weak (TypeScript adds static types)
Memory
Garbage collected
Runs
V8 / SpiderMonkey / JSC engines (JIT)
Concurrency
Single-threaded event loop, workers

Basics

The concepts you need before patterns make sense in JavaScript.

The event loop

One thread runs your code. I/O is non-blocking; callbacks, promises and timers are queued and run when the call stack is empty.

console.log("Hello, patterns!");

Values, objects, prototypes

Objects inherit through prototypes. class syntax (ES2015) is a clearer layer over the same mechanism.

Functions and closures

Functions are values. A closure keeps access to variables from the scope where it was created.

Promises and async / await

A Promise represents a future value; async functions let you await it with sequential-looking code.

ES modules

import / export are the standard module system in browsers and Node.js.

Saved in this browser only. Part of Clean code foundations (0/5).