JavaScriptWeb Components are web-platform mechanisms for building custom interface elements. Learn how to register a class extending HTMLElement, respond to connection and disconnection, and observe attributes. These are browser APIs, not features supplied by ECMAScript itself.
Intermediate · Web-platform APIs, not tied to an ECMAScript edition. The example's exact console output was verified in isolated Chromium 157.0.8103.51 only; this does not establish broader browser compatibility. Node 24 in the repository does not establish browser API support.JavaScriptPass `controller.signal` to an operation that supports cancellation, call `controller.abort()` to request it, and read `signal.aborted` to inspect the signal rather than the operation's outcome.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptSet the FFT window size and spectrum smoothing, then size separate byte arrays for frequency bins and time-domain samples.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptReport validation errors, hide decorative content from assistive technology, and move keyboard focus without adding an extra stop to the Tab sequence.
Intermediate · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptARIA live regions expose content updates to assistive technology without moving focus. Choose the priority of an announcement and how much context it should include.
Intermediate · Current web platform; runtime support variesJavaScriptThe same square brackets select array elements and access object properties by keys computed at runtime.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptTake values from an iterable in order, skip positions, provide defaults, and collect the remaining values in a new array.
Basic · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptAn array binding pattern initializes variables from values in iteration order. It can skip values, supply defaults, and collect the remaining values into a new array.
Intermediate · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptUnpack values from one iterable argument directly in a function signature, and distinguish an element default from a default for the entire parameter.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptUse an array pattern to unpack one iterable argument in a function’s parameter list. Defaults for the argument and for individual values are separate.
Intermediate · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptUse square brackets to read and write zero-based array elements. Whether a key is an array index affects `length`, and a missing element is not the same as a stored `undefined`.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptAn array’s `length` defines its index span, not how many elements are present. Writing a new index can extend the array, while shortening it can delete elements.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptAn array’s `length` sets its index boundary; it does not count elements. Learn how indexed writes change that boundary and how to tell a hole from `undefined`.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptRead `arr.length` to get an array’s length, or assign to it to truncate the same array or extend it without creating elements.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptArrow functions use `=>`. The parameter list determines whether parentheses are required, and the body form determines whether a value is returned implicitly. The surrounding scope supplies `this`.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptAn arrow function has no `this` binding of its own. It uses the binding from its enclosing lexical context, regardless of how the arrow is called.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptRoute an audio or video element through an analyser to the audio output, and manage graph processing separately from the element’s playback.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptUse `new Blob()` to combine text and binary parts into an immutable sequence of bytes. Options set the MIME label and control how text line endings are handled.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptUse `blob.size` to get the total byte count without reading the contents, and `blob.stream()` to process those bytes in chunks.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptSeparate clearing pixels from resetting the path. Build a circle with `arc()`, choose a paint with `fillStyle`, and render its interior with `fill()`.
Intermediate · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptDistinguish Canvas 2D drawing operations from direct bitmap reads and writes, and know when each coordinate system applies.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScript`fillStyle` controls what fills a shape, `strokeStyle` controls what paints its outline, and `lineWidth` sets the outline's thickness. Each is a separate Canvas 2D drawing-state property.
Advanced · ECMAScript 2024 and the current web platform; runtime support variesJavaScriptSet stroke width and paint, fill paint, the font, and the vertical text anchor on a Canvas 2D rendering context.
Intermediate · ECMAScript 2024 and the current web platform; runtime support variesJavaScript`save()` pushes the current drawing state onto a stack, and `restore()` pops and reinstates the most recently saved state. Neither method undoes changes to pixels.
Intermediate · ECMAScript 2024 and the current web platform; runtime support varies