Posts
JavaScript Basics: Group Items with Object and Map
Grouping collects related items into arrays. Use a short label for each group, or use an object itself when its identity matters. These examples use built-in features and were …
October 17, 2026
JavaScript Basics: Format Numbers with Intl.NumberFormat
Number displays vary by language and region. Use Intl.NumberFormat to format separators, currencies, and percentages instead of assembling those strings yourself. These examples …
October 17, 2026
JavaScript Basics: Cancel Waiting with AbortController
An asynchronous task may become unnecessary before it finishes. An AbortController lets you signal cancellation to APIs that support it. Here, cancel a promise-based timer without …
October 17, 2026
JavaScript Basics: Unpack Arrays and Objects
Destructuring names the pieces of a value that your code needs. Try positional array unpacking, renamed object fields, and nested records. These examples use built-in features and …
October 17, 2026
JavaScript Basics: Keep State with Closures
A function can remember variables from the scope where it was created. Use that ability to make small tools with their own state. These examples use built-in features and were …
October 17, 2026
JavaScript Basics: Handle Errors Without Hiding Them
An error handler should recover from failures it understands and preserve failures it cannot handle. These small examples cover selective catching, error causes, and cleanup. These …
October 17, 2026
JavaScript Basics: Connect Listeners with EventEmitter
Node.js EventEmitter lets one part of a program announce an event and another react to it. These examples keep the listeners synchronous so their order is visible. These examples …
October 17, 2026
JavaScript Basics: Calculate SHA-256 Digests
A digest is a fixed-size representation of bytes. Use Node.js to hash text, combine chunks, and detect a changed input. These examples do not encrypt data or authenticate its …
October 17, 2026
JavaScript Basics: Work with UTC Dates and Timestamps
A timestamp identifies an instant, while a formatted date presents it to a reader. This tutorial creates UTC dates, calculates elapsed time, and checks the difference between an …
October 17, 2026
JavaScript Basics: Produce Values One at a Time with Generators
A generator is a function that can pause and produce a sequence of values. A consumer asks for the next value when it needs one. This tutorial uses synchronous generators to …
October 17, 2026