---
title: "JavaScript Articles: Operators, Errors and New APIs"
description: "JavaScript articles with runnable examples: the ?? and &&= operators, truthy and falsy values, AggregateError, Promise.try, Float16Array and more."
canonical: "https://www.trevorlasn.com/topics/javascript"
author: "Trevor I. Lasn"
last-updated: "2026-11-08"
---

# JavaScript Articles: Operators, Errors and New APIs

JavaScript articles with runnable examples: the ?? and &&= operators, truthy and falsy values, AggregateError, Promise.try, Float16Array and more.

37 current articles on JavaScript, newest first. See [every topic](https://www.trevorlasn.com/topics.md).

## 2025

- [View Transitions API: Smooth animations between DOM states](https://www.trevorlasn.com/blog/view-transitions-api.md): Create animated transitions between different states of your app without complex animation libraries. (2025-11-11)
- [How JavaScript Was Written Back In the Day](https://www.trevorlasn.com/blog/revisiting-legacy-javascript.md): How was JavaScript written back in the day? I dug into early frameworks and libraries to see how code looked then and what still holds up. (2025-06-12)
- [JavaScript compile hints: what they are and when to use them](https://www.trevorlasn.com/blog/javascript-compile-hints.md): V8's compile hints let you control which JavaScript gets compiled immediately during page load (2025-05-12)
- [Error.isError() in JavaScript: A Reliable Error Check](https://www.trevorlasn.com/blog/error-iserror-javascript.md): Why the new Error.isError() method solves important cross-realm issues and provides more reliable error identification than instanceof (2025-05-09)
- [Float16Array in JavaScript](https://www.trevorlasn.com/blog/float16array-javascript.md): Float16Array stores 16-bit floating point numbers in half the memory of a Float32Array. How it works, when to use it and which browsers support it. (2025-04-14)
- [Intl.DurationFormat: Format Durations with Locale Support](https://www.trevorlasn.com/blog/intl-durationformat-javascript-time-durations-with-locale-support.md): Stop writing manual duration formatting code. Instead, leverage the new powerful Intl.DurationFormat API for internationalized time displays (2025-03-13)
- [WeakRefs in JavaScript: Explained In Simple Terms](https://www.trevorlasn.com/blog/weakref-javascipt.md): A WeakRef points to an object without stopping the garbage collector from freeing it. When that helps, how deref() works, and cleanup with FinalizationRegistry. (2025-01-07)

## 2024

- [navigator.clipboard: The Async Clipboard API in JavaScript](https://www.trevorlasn.com/blog/javascript-navigator-clipboard.md): Copy and paste text, images, and files using the new navigator.clipboard API (2024-12-07)
- [link rel=modulepreload: Load JavaScript Modules Sooner](https://www.trevorlasn.com/blog/module-preload.md): rel=modulepreload fetches, parses and compiles an ES module before a script imports it. How to use it, and why each module in the graph needs its own link. (2024-12-04)
- [Web Performance API: Measure What Matters](https://www.trevorlasn.com/blog/performance-web-api-in-javascript.md): From slow to fast: Using JavaScript's Performance API to optimize web apps (2024-11-29)
- [JavaScript Scheduler API: Prioritize Tasks with postTask()](https://www.trevorlasn.com/blog/javascript-scheduler-api.md): scheduler.postTask() runs JavaScript at user-blocking, user-visible or background priority, giving finer control than setTimeout(0) over when work runs. (2024-11-26)
- [WebAssembly (Wasm): When (and When Not) to Use It](https://www.trevorlasn.com/blog/webassembly-when-and-when-not-to-use-it.md): Understanding the real use cases for WebAssembly beyond the performance hype (2024-11-25)
- [The Fight to Free JavaScript from Oracle's Control](https://www.trevorlasn.com/blog/oracle-javascript-trademark-saga.md): The creator of JavaScript and Node.js are challenging Oracle's control over the JavaScript name (2024-11-23)
- [Recursion Explained In Simple Terms](https://www.trevorlasn.com/blog/recursion-explained.md): Understanding recursion through real examples - why functions call themselves and when to use them (2024-11-22)
- [JavaScript Sets and Maps: Beyond Arrays and Objects](https://www.trevorlasn.com/blog/sets-and-maps-in-javascript.md): How to handle unique values and key-value pairs properly without type coercion and performance issues (2024-11-17)
- [Precise Decimal Math in JavaScript with Fraction.js](https://www.trevorlasn.com/blog/fraction-numbers-in-javascript.md): How to handle exact decimal calculations in JavaScript when floating-point precision isn't good enough (2024-11-16)
- [Exploring JavaScript Symbols](https://www.trevorlasn.com/blog/symbols-in-javascript.md): Deep dive into JavaScript Symbols - what they are, why they matter, and how to use them effectively (2024-11-15)
- [Understanding Bitwise Shifts in JavaScript: << and >>](https://www.trevorlasn.com/blog/bitwise-shifts-in-javascript.md): A left shift multiplies a number by 2 per position, and a right shift divides it by 2. How JavaScript's bitwise shift operators work, with binary examples. (2024-11-12)
- [JavaScript Import Attributes (ES2025)](https://www.trevorlasn.com/blog/import-attributes-in-javascript.md): Understanding the new import attributes syntax and why we can't rely on file extensions alone (2024-11-10)
- [Promise.try in JavaScript: One Error Path for Sync and Async](https://www.trevorlasn.com/blog/promise-try-in-javascript.md): Stop mixing try/catch with Promise chains - JavaScript's new Promise.try handles return values, Promises, and errors uniformly (2024-11-10)
- [JavaScript &&= Operator: Logical AND Assignment Explained](https://www.trevorlasn.com/blog/javascript-logical-and-assignment-operator.md): Use the &&= operator to safely update truthy values while preserving falsy states (2024-11-05)
- [Nullish Coalescing Assignment (??=) in JavaScript](https://www.trevorlasn.com/blog/javascript-nullish-coalescing-assignment-operator.md): x ??= y assigns y only when x is null or undefined, so 0, false and empty strings stay. How it differs from || and where it saves code. (2024-11-05)
- [JavaScript Pipeline Operator (|>): The Hack Pipes Proposal](https://www.trevorlasn.com/blog/javascript-pipeline-operator.md): The Stage 2 pipeline operator passes a value through a chain of calls left to right, with % marking where it goes, instead of nesting h(g(f(x))). (2024-10-29)
- [Why localStorage Is Unsafe for Tokens and Secrets](https://www.trevorlasn.com/blog/the-problem-with-local-storage.md): localStorage is vulnerable to XSS and has no expiry or encryption. Learn why httpOnly cookies and sessionStorage are safer for auth tokens. (2024-10-28)
- [JavaScript Falsy Values: All 8, Plus Why [] Is Truthy](https://www.trevorlasn.com/blog/javascript-truthy-and-falsy.md): JavaScript has eight falsy values: false, 0, -0, 0n, an empty string, null, undefined and NaN. Empty arrays and objects are truthy. The edge cases, explained. (2024-10-27)
- [JavaScript && vs || vs ??: Logical Operators Explained](https://www.trevorlasn.com/blog/javascript-logical-operators.md): || returns the first truthy value, && the first falsy one, and ?? falls back only on null or undefined. When to use each, and the cases that trip people up. (2024-10-26)
- [VoidZero, VC Funding and Open Source JavaScript Tooling](https://www.trevorlasn.com/blog/is-void-zero-a-threat-to-open-source.md): VoidZero, Evan You's company behind Vite, took venture money. What that means for open source, and why its tools stayed MIT as it joins Cloudflare. (2024-10-15)
- [setImmediate() vs setTimeout(0) in Node.js: The Difference](https://www.trevorlasn.com/blog/setimmediate-vs-settimeout-in-javascript.md): setImmediate runs after I/O, setTimeout(0) runs after the timer phase. Here's when to use each, with event loop diagrams. (2024-09-08)
- [Understanding JavaScript Closures With Examples](https://www.trevorlasn.com/blog/understanding-javascript-closures.md): Closures are essential for creating functions that maintain state, without relying on global variables. (2024-09-06)
- [AggregateError in JavaScript: Handle Multiple Errors at Once](https://www.trevorlasn.com/blog/aggregate-error-in-javascript.md): AggregateError holds several errors in one, the way Promise.any() reports that every promise rejected. How to throw and read it, plus the new SuppressedError. (2024-09-02)
- [Early Returns and Intermediate Variables in JavaScript](https://www.trevorlasn.com/blog/embrace-early-returns-and-intermediate-variables-for-readable-code.md): Intermediate variables name each step of complex logic, and early returns handle failing cases first. A JavaScript authentication check, rewritten both ways. (2024-08-30)
- [Understanding Vue's Suspense](https://www.trevorlasn.com/blog/understanding-vue-suspense.md): How the Suspense component manages async dependencies and improves loading states in Vue apps (2024-08-23)
- [The Only Widely Known JavaScript Feature Ever Deprecated](https://www.trevorlasn.com/blog/the-only-javascript-feature-that-was-deprecated.md): The 'with' statement is the only feature ever deprecated in JavaScript (2024-08-22)
- [Remove Unnecessary NPM Packages with eslint-plugin-depend](https://www.trevorlasn.com/blog/eslint-plugin-depend.md): eslint-plugin-depend flags npm packages like is-odd that plain JavaScript replaces. How to install and configure it, and its move to @e18e/eslint-plugin. (2024-08-13)
- [Common Causes of Memory Leaks in JavaScript](https://www.trevorlasn.com/blog/common-causes-of-memory-leaks-in-javascript.md): Common causes of JavaScript memory leaks in Node.js and Deno, such as global objects and callbacks that hold large data, and how to profile heap usage. (2024-08-10)

## 2019

- [Mermaid.js: Charts and Diagrams from Markdown-like Syntax](https://www.trevorlasn.com/blog/mermaid-create-charts-and-diagrams-with-markdown.md): Mermaid.js is a simple markdown-like script language for generating charts from text via JavaScript (2019-10-30)
- [Peaks.js: Interact With Audio Waveforms](https://www.trevorlasn.com/blog/peaks-js-interact-with-audio-waveforms.md): Peaks.js is a client-side JavaScript component to display and interact with audio waveforms in the browser (2019-10-22)
