
Handling API Routes in Next.js: When to Use Server Actions vs. API Routes
Next.js gives us two ways to handle back‑end logic: API Routes and Server Actions. Here, I clearly explain when to choose each approach for the best results.
Articles
ES6 (also known as ECMAScript 2015), was the sixth edition of the ECMAScript specification. It introduced a lot of improvements and new features to the JavaScript language (such as arrow functions, promises, classes, and template literals).
Below you will find a subset of articles from my blog specifically about ES6. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are forty‑two collected together for you below.

Next.js gives us two ways to handle back‑end logic: API Routes and Server Actions. Here, I clearly explain when to choose each approach for the best results.

Set and MapJavaScript's `Set` and `Map` simplify common tasks like managing unique values or key‑value pairs. Here, I'll share practical examples for everyday development.

Tail call optimisation in JavaScript, why it matters conceptually, and why patchy engine support still makes it unreliable for production recursion.

WeakMap and WeakSet in JavaScriptUnderstand WeakMap and WeakSet in JavaScript, including weak references, metadata storage, private data patterns, memory behaviour, and Map or Set differences.


An exploration of techniques I used to to find differences between two strings in JavaScript; from character‑by‑character comparison to substring analysis.

A look into how we can use the Intersection Observer API in JavaScript to efficiently track element visibility and how it outperforms historical alternatives.

Automate copyright year updates across JavaScript, React, Angular, Vue, jQuery, PHP, and WordPress so footers do not go stale each January across stacks.

Solve the 3Sum problem in JavaScript with sorting, two pointers, duplicate skipping, Jest coverage, edge cases, and a clear TypeScript implementation.

Falsy and nullish values are not the same in JavaScript. This guide clears up the difference and shows why 0 and empty strings often trip people up.

Solve Longest Substring Without Repeating Characters in JavaScript with a sliding window, unique‑character tracking, and substring return variants.

A simple solution to solve the Valid Palindrome problem in JavaScript using the two‑pointer approach in ES6 and TypeScript, checking alphanumeric characters.

filter() Method in JavaScriptUse JavaScript filter() to create arrays of matching items, with callback syntax, object filtering examples, readable predicates, and practical tips.

Solve the Two Sum problem efficiently in JavaScript with Hash Map or Two Pointers. Learn how to find pairs of numbers that sum up to a given target.

A tour of commonly misunderstood JavaScript features, from sort(), slice(), splice(), split(), Math.random(), parseInt(), isNaN(), typeof, and more.

Care needs to be taken when using the onScroll event; it can trigger frequently, leading to greater client‑side resource (CPU) usage, and a laggy interface.

A simple explanation about how to handle multiple named exports from a single JavaScript file; an essential piece of knowledge when developing modern websites.

When export and import was introduced as part of ES6, things changed for the better in JavaScript development. It still causes confusion though. Let me explain.