Posts
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
JavaScript Basics: Copy Nested Data with structuredClone
Copying an object can still leave its nested data shared with the original. This tutorial compares a shallow copy with structuredClone(), then checks supported data types and a …
October 17, 2026
JavaScript Basics: Combine Tasks with Promise.all and Promise.allSettled
A promise represents an eventual result. When several independent tasks belong together, you can collect their promises and wait for the group. This tutorial compares an …
October 17, 2026
JavaScript Basics: Calculate Exact Integers with BigInt
A counter can grow beyond the range where ordinary JavaScript numbers represent every integer exactly. This tutorial uses BigInt to increase a large counter, divide whole …
October 17, 2026