Blog
Notes on data structures & algorithms, system design, and things I learn along the way.
Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→Four array methods replace most of the for-loops you'll ever write. What map, filter, reduce and find each do, step by step, how to chain them, and when a plain loop is still the better choice.
The browser turns your HTML into a tree of objects, and that tree — not the HTML file — is what's on screen and what JavaScript changes. How to find, change, create and remove elements, and how events travel through the tree.
A callback is a function you hand to another function to call later. Why JavaScript is built on them, the difference between synchronous and asynchronous callbacks, and how 'callback hell' led to promises and async/await.
JavaScript objects look like hash maps, but engines don't treat them that way. How hidden shapes and inline caches turn property access into a single memory load — and the coding habits that quietly switch that optimization off.
Local variables vanish when a function returns; objects outlive it. The two regions of memory behind that difference, why assigning an object never copies it, and what it means for closures, performance, and leaks.
The key prop isn't there to silence a console warning. It's how React decides whether an element is the same thing it rendered last time — and getting it wrong moves state to the wrong row. How the diff works, and how to pick a key.
Spread and Object.assign copy one level; everything below is shared. Why that causes “I copied it and the original still changed”, how structuredClone fixes it, and the functions, classes and DOM nodes it refuses to touch.
An instant and a wall-clock reading are different things, and Date conflates them. What DST actually does to your data, and how Temporal's types stop the bugs at the point of modelling.
A twenty-character input, a regex that looks fine, and a CPU pinned for minutes. Why backtracking engines go exponential, how to spot the pattern, and what to do instead.
Promises have no cancel button. AbortController is the standard signal that does — for fetch, event listeners, streams, timers, and your own async functions.
38 posts tagged JavaScript · page 2 of 4