
Flattening Arrays in JavaScript
Flatten arrays in JavaScript with `flat()`, depth control, recursion, stack‑based helpers, and clear examples of how non‑array values are handled.
Articles
Front‑end web development is my personal niche, it is the art of creating visual and interactive elements for a website, including layout, design, and interactivity, using HTML, CSS, and JavaScript.
Below you will find a subset of articles from my blog specifically about Front‑End Development. This is an area I have worked with for many years, and it has been a regular subject in my writing. There are four hundred sixteen articles collected together for you below.

Flatten arrays in JavaScript with `flat()`, depth control, recursion, stack‑based helpers, and clear examples of how non‑array values are handled.

How to write effective Angular unit tests that focus on behaviour, TestBed boundaries, realistic setup, and assertions that survive refactoring over time.

Find the weekday from a JavaScript date with Date, UTC alternatives, modulo arithmetic, parsing caveats, daylight saving time, and readable day names.

clamp()Use CSS clamp() for fluid typography, spacing, and layouts with clear minimums and maximums, plus media‑query trade‑offs and responsive examples.

instanceofUncover the differences between JavaScript's `instanceof` and `typeof` for type checking, with practical examples and insights on when to use each operator.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

styled‑componentsUse transient props in styled‑components to keep styling‑only props out of the DOM, clean React output, and support safer component migration work.

How to build a Progressive Web App with Angular, including service workers, caching, offline behaviour, installs, and the trade‑offs behind the defaults.

max()Use CSS max() for responsive sizing, spacing, and layout decisions where the browser should choose the larger value within a fluid design without JavaScript.

{} isn't Equal to {}In JavaScript two empty objects are not equal. One of my go‑to interviewing questions, here I offer an explanation and strategies to compare object contents.

The Vue 3 Composition API explained with practical TypeScript examples, refs, composables, reactivity, and when the pattern genuinely helps larger components.

min()In CSS, `min()` function allows us to set the smallest value from a set as the value of a CSS property. This can be hugely useful in responsive development.

Test JSX‑driven content in Cypress by comparing rendered output, extracting text, handling order, avoiding brittle assumptions, and respecting performance.

Angular change detection explained through zone triggers, OnPush, signals, template cost, manual checks, and practical rendering optimisation at scale.

Why view source stopped being enough for modern web checks, and how rendered HTML, hydration, metadata, schema, crawl paths, and client output changed audits.

calc()A discussion on how to use CSS calc() for dynamic calculations directly within your styles. Learn to mix units, perform calculations, and improve responsivity.

.then() in Modern JavaScript.then() still matters in modern JavaScript. This guide explains promise chaining, return values, and why Promise.prototype.then() remains useful.

Understanding `stopPropagation` and `preventDefault` is key to handling events in JavaScript. Here, I explore their differences and when to use each.