
The Difference Between == and === in JavaScript
Compare == and === in JavaScript through type coercion, strict equality, surprising conversions, safer defaults, and when loose equality still appears.
Articles
JavaScript is probably one of the most‑used programming languages in the world, and a cornerstone of front‑end (and more general) web development. It enables the development of interactivity and features that HTML and CSS alone simply cannot, and includes more advanced concepts like closures, callbacks, and asynchronous programming.
Below you will find a subset of articles from my blog specifically about JavaScript. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are three hundred collected together for you below.

== and === in JavaScriptCompare == and === in JavaScript through type coercion, strict equality, surprising conversions, safer defaults, and when loose equality still appears.

An article that provides a beginner‑friendly introduction to classes in JavaScript, explaining what they are, how they work, and how to use them in your code.

Comparing arrays in JavaScript is trickier than it first looks. This guide covers reference equality, value comparison, and practical alternatives.

IIFEs were a common JavaScript pattern before modern modules took over. This guide explains what they do, why they existed, and when they still appear.

call, apply, and bind in JavaScriptUnderstand call, apply, and bind in JavaScript, including this context, argument passing, borrowed methods, invocation differences, and practical use.

Append and prepend array items in JavaScript with push(), unshift(), spread syntax, mutation trade‑offs, return values, and cleaner update patterns.

The JavaScript prototype chain underpins inheritance, enabling object property sharing. Here, I explore its workings, property searching, and quirks.

Type coercion in JavaScript explained clearly, including implicit vs. explicit conversion, equality surprises, string concatenation, and number casting.

Use CommonJS modules in JavaScript with require() and module.exports, covering Node.js origins, browser bundling, limitations, and ES module comparison.

Controlled vs. uncontrolled components in React explained with form examples, refs, validation trade‑offs, and why each approach suits different jobs.

this Changes in JavaScript Event Handlers and MethodsUnderstand why this changes in JavaScript methods and event handlers, including call sites, arrow functions, bind(), event objects, and context bugs.
forEach and for...ofWith the introduction of the new JavaScript standard ES6, there are some new and interesting ways to loop through data, which I discuss here today.

Asynchronous Module Definition explained, including AMD module loading, define(), dependency handling, CommonJS, ES modules, and modern relevance.

Callbacks are a core part of JavaScript, even if promises get more attention now. This guide explains how they work and where they still show up.

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!

Create script elements dynamically with JavaScript, setting src, choosing head or body placement, loading external scripts, and understanding execution timing.