
Primitive vs. Reference Types in JavaScript
Primitive vs. reference types in JavaScript explained clearly, including copying behaviour, mutation, equality, and why arrays and objects surprise beginners.
Articles
This is a very broad category within my articles which encompasses any aspect of web development, from initial design and architecture to coding, testing, and deployment.
Below you will find a subset of articles from my blog specifically about Development. This is an area I have worked with for many years, and it has been a regular subject in my writing. There are three hundred ninety‑eight articles collected together for you below.

Primitive vs. reference types in JavaScript explained clearly, including copying behaviour, mutation, equality, and why arrays and objects surprise beginners.

Lifting state up in React explained clearly, including shared state, single sources of truth, child callbacks, and when moving state higher helps.

localhostThere are many reasons that you might want to detect whether your code is running on localhost. Aside from using environment variables, there's also JavaScript!

Decide when a jQuery plugin is worth using, and when a small custom script is safer, clearer, easier to maintain, and less likely to leak assumptions.

Five habits of a good web developer, covering clean code, performance, testing, collaboration, curiosity, standards, and communication beyond code.

How to read JavaScript errors and stack traces in the browser, including common error types, line numbers, call stacks, and a practical debugging workflow.

Pass by value vs. reference in JavaScript explained clearly, including why objects seem shared, how reassignment differs from mutation and common beginner bugs.
Pick a random array element in JavaScript with Math.random(), safe index calculation, reusable helpers, and notes on real interface randomisation.
A common web development task: get the number of years between two dates. I discuss how to do this with PHP in the back‑end, or front‑end with JavaScript.

data‑* Attributes and dataset in JavaScriptUse data attributes and dataset in JavaScript to connect HTML and behaviour cleanly, handle camelCase mapping, event delegation, and string values.

Write small JavaScript behaviours that work without jQuery, covering selectors, classes, events, feature checks, fallbacks, and easier migration paths.
closest() in Vanilla JavaScript and jQueryUse closest() for DOM traversal in jQuery and vanilla JavaScript, replacing manual parent walking in menus, click handlers, and interactive UI cleanly.

classList in JavaScript: add(), remove(), toggle(), and contains()Use classList in JavaScript for add(), remove(), toggle(), and contains(), with cleaner DOM state updates, validation examples, and className cautions.

Use jQuery as an enhancement layer while keeping links, forms, navigation, and core page content usable without JavaScript, late scripts, or plugin failure.
Handle click events in JavaScript with onclick and addEventListener, including vanilla alternatives to jQuery, event targets, and common interaction patterns.

DOMContentLoaded vs. load in JavaScriptCompare DOMContentLoaded and load in JavaScript, including parsing, asset loading, script timing, selector failures, and when each event is useful.

querySelector Returns null in JavaScriptDebug querySelector returning null in JavaScript by checking selector syntax, DOM timing, missing elements, search scope, and querySelectorAll differences.
Check whether an element exists with jQuery or vanilla JavaScript before running DOM code, avoiding null errors and fragile client‑side behaviour.