
Find Peak Element: Binary Search Without a Fully Sorted Array
How to solve LeetCode Find Peak Element with binary search, and why local comparisons are enough even when the array is not sorted in the usual way.
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.

How to solve LeetCode Find Peak Element with binary search, and why local comparisons are enough even when the array is not sorted in the usual way.

The 'Course Schedule' problem tests our ability to detect cycles using graph traversal. I'll explain a clear solution using depth‑first search with TypeScript.

How to test Vue components with Vue Test Utils using realistic interactions, focused assertions, better test boundaries, and less brittle design.

How to solve Search in Rotated Sorted Array with modified binary search, identifying the sorted half each step and narrowing safely in TypeScript.

The 'Merge Two Sorted Lists' problem on LeetCode involves combining two sorted linked lists into one. Here, I explore a clear solution with TypeScript examples.

Solve Koko Eating Bananas with binary search on the answer, using feasibility checks, speed bounds, ceiling division, TypeScript examples, and edge cases.

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.

JavaScript Symbols explained in plain English, including unique keys, well‑known symbols, hidden metadata, and the cases where they are genuinely useful.

React's virtual DOM optimises performance by reducing updates to the real DOM. Here, I explain how it works, how it compares, and why it improves efficiency.

Managing routes in large Vue applications can become challenging. Here, I share practical best practices for structuring Vue Router to keep apps organised.

Garbage collection in JavaScript frees up unused memory automatically. Here, I explain how it works and how to prevent memory leaks in your applications.

How to implement server‑side rendering in Vue, with a clearer mental model for hydration, data loading, caching, and where SSR actually pays off.

Solve Daily Temperatures with a monotonic stack in TypeScript, storing indices to find the next warmer day without repeated scanning and common mistakes.

Dive into solving the 'Generate Parentheses' problem using TypeScript. This guide covers the backtracking solution and explains each step in detail.

Implement a Trie prefix tree in TypeScript with Map‑based nodes, insert, search, startsWith, shared prefixes, complexity, and alternative child storage.

How to build efficient recursive functions in JavaScript, with better base cases, less repeated work, and a clearer sense of when recursion fits naturally.

Execution context defines how JavaScript code runs, from global scope to function calls. Here, I explore how it works in browsers, React, Next.js, and Node.js.