Tutorial
-
PHP syntax: tags, statements, comments and echo
Learn PHP tags, statements and semicolons, comments, echo and print, and how PHP mixes with HTML.
-
Symbols and well-known symbols
Unique property keys with Symbol, and customising language behaviour with Symbol.iterator and friends.
-
Map, Set, WeakMap and WeakSet
When to use Map and Set instead of objects and arrays, and what the weak versions are for.
-
Cancellation, retries and backoff
Cancel work with AbortController, add timeouts, retry with exponential backoff and avoid race conditions.
-
Regular expressions in JavaScript
Pattern syntax, flags, testing and replacing, named groups, and when a regex is the wrong tool.
-
Designing a small JavaScript library
API design, defaults and options objects, error messages, types, versioning and publishing to npm.
-
JSON: parse and stringify
Convert between objects and JSON text, handle parse errors, and what JSON cannot represent.
-
Dates, times and formatting with Intl
The Date object and its pitfalls, formatting dates, numbers and currencies with Intl, and the Temporal API.
-
Creating, inserting and removing DOM elements
Build elements with createElement, insert them with append and before, use template elements, and remove nodes.
-
Event bubbling, capturing and delegation
How events travel through the DOM, stopping propagation, and handling many elements with one listener.
-
Callbacks and asynchronous code
Why JavaScript is asynchronous, callback functions, and the problems that led to promises.
-
Promises
Create and consume promises, chaining with then, error handling with catch, and finally.
-
async and await
Write asynchronous code that reads top to bottom, handle errors with try and catch, and run tasks in parallel.
-
Fetching data with fetch()
Request JSON from an API with fetch, check response status, and show loading and error states.
-
Debugging with the console and DevTools
Read error messages, log effectively, set breakpoints and step through code in browser DevTools.
-
ES modules: import and export
Split code into modules with named and default exports, use modules in the browser, and dynamic import.
-
Scope, hoisting and the temporal dead zone
Global, function and block scope, hoisting of declarations, and why let and const throw before declaration.
-
Error handling: try, catch, finally and custom errors
Throw and catch errors, error types, custom error classes, and handling async errors.
-
Closures
How functions remember their surrounding scope, practical uses, and common closure bugs.
-
Classes
Class syntax, constructors, methods, private fields, static members and extends.