JavaScript
JavaScript is the language most people learn by accident — you come for a button that does something, and stay for closures, hoisting and the event loop. These articles cover the parts that actually trip people up in real code, with runnable examples rather than definitions.
Language fundamentals
- Optional Chaining and ??: Why || Breaks on Zero A student who scored zero shows up with full marks, and a cleared address field silently reverts to the old value. Both are the same one-character bug: using || where you needed ??. Tutorial · 10 min read · August 6, 2026
- JavaScript sort(): Why [10, 9, 1] Becomes [1, 10, 9] Sorting numbers with plain .sort() gives you an order that looks random until you realise every element was converted to a string first. And the array you sorted was modified, which is its own bug. Tutorial · 11 min read · August 6, 2026
- JavaScript Prototypes Explained: The Chain Behind class Only functions have a prototype property. Objects have a hidden link called __proto__. Confusing the two costs most beginners an hour, and costs candidates the interview. Tutorial · 11 min read · August 6, 2026
- Shallow vs Deep Copy in JavaScript: The Nested Trap You spread an object, change one nested field, and the original changes too. The copy was real, but it only went one level deep. Tutorial · 11 min read · August 6, 2026
- The JavaScript this Keyword, Finally Explained this is not decided by where a function is written. It is decided by how the function is called — which is why the same function behaves differently in two places. Tutorial · 10 min read · August 5, 2026
- JavaScript Hoisting Explained: var, let, const and Functions Nothing is physically moved to the top of the file. Understanding what actually happens explains why var returns undefined while let throws. Tutorial · 9 min read · August 5, 2026
- Spread and Rest in JavaScript: Same Syntax, Opposite Jobs The same three dots do two opposite things depending on where you write them. And the copy they make is shallower than most people assume. Tutorial · 9 min read · August 5, 2026
- JavaScript Closures Explained With Simple Examples A beginner-friendly guide to closures in JavaScript, built on lexical scope, with a counter, private variables, and the classic loop gotcha fixed by let. Tutorial · 9 min read · July 22, 2026
- JavaScript Destructuring: Arrays and Objects the Easy Way JavaScript destructuring lets you unpack arrays and objects into variables in one clean line. Here is how it works, with beginner-friendly examples. Tutorial · 9 min read · July 22, 2026
- JavaScript Arrow Functions: Syntax and When to Use Them A beginner-friendly guide to arrow function syntax, implicit returns, the single-parameter shorthand, and the this binding gotchas that trip people up. Tutorial · 9 min read · July 22, 2026
- == vs === in JavaScript: What's the Difference? == compares after converting types; === compares value and type with no conversion. See the surprising coercion cases and when to use each. Comparison · 8 min read · July 22, 2026
- Top JavaScript Array Methods Every Developer Should Know Meet the JavaScript array methods beyond map and filter — push, pop, slice, splice, indexOf, includes, find and sort — with clear examples and mutation tips. Tips & Tricks · 8 min read · July 22, 2026
Async and the event loop
- JavaScript Generators: Functions That Pause Mid-Run You call a generator function and nothing happens. No console.log, no validation, no error. That is not a bug, and understanding why unlocks lazy sequences, custom iterables and streaming APIs. Tutorial · 11 min read · August 6, 2026
- JavaScript Error Handling: try, catch and Async Traps A try/catch around code that returns a promise catches nothing. The catch block has already finished by the time the failure arrives, and the error escapes silently. Tutorial · 12 min read · August 6, 2026
- Python async/await and asyncio, Explained Properly One time.sleep() call inside an async function freezes every other task in your program. Here is what await actually does, and why async speeds up network calls but not number crunching. Tutorial · 10 min read · August 6, 2026
- Unhandled Promise Rejection in Node: Causes and Fixes One missing await turns a try/catch into decoration. The block completes, the promise rejects a moment later, and modern Node responds by killing your server. Tutorial · 11 min read · August 6, 2026
- The JavaScript Event Loop Explained With Examples JavaScript runs on one thread and still handles thousands of things at once. The event loop is how — and it explains every async ordering puzzle you have hit. Tutorial · 10 min read · August 5, 2026
- JavaScript Promises Explained for Beginners A beginner-friendly guide to JavaScript promises: what the promise object is, its three states, how chaining works, and how it fixes callback hell. Tutorial · 9 min read · July 22, 2026
- JavaScript Fetch API Tutorial: Call APIs From the Browser A beginner-friendly guide to calling APIs from the browser with fetch: GET, POST, JSON, headers, error handling, and async/await, with working code. Tutorial · 9 min read · July 22, 2026
- JavaScript Async/Await Explained (with Promises) Callbacks, Promises, and async/await explained simply — see how await makes asynchronous JavaScript read top to bottom, with a fetch() and try/catch example. Tutorial · 9 min read · July 22, 2026
Debugging JavaScript
- SyntaxError: Unexpected Token and How to Locate It The line number in a SyntaxError is almost never the line with the mistake. And when the unexpected token is a less-than sign, your API returned an HTML error page. Tutorial · 11 min read · August 6, 2026
- Why Your JavaScript Says NaN (and How to Fix It) NaN is contagious — one appears and every calculation downstream becomes NaN. Finding the first one is the entire debugging task. Tutorial · 8 min read · August 6, 2026
- Maximum Call Stack Size Exceeded: Causes and Fixes A stack overflow in JavaScript. Usually a missing base case — but the React version and the accidental-recursion version are sneakier. Tutorial · 9 min read · August 6, 2026
- TypeError: Cannot Read Property of Undefined — How to Fix It The most common error in JavaScript, and the message points at the symptom rather than the cause. Here is how to find where the undefined actually came from. Tutorial · 9 min read · August 6, 2026
- What Is CORS and How to Fix the Error The request worked in Postman and fails in the browser. Nothing is broken — you are meeting a rule that only browsers enforce. Tutorial · 10 min read · August 5, 2026
More on JavaScript
- Nginx Basics for Developers: Reverse Proxy Explained Adding one slash to the end of proxy_pass changes the URL your backend receives. That single character is behind most of the 404s people blame on their router. Tutorial · 10 min read · August 6, 2026
- XSS Explained: Why innerHTML Is a Security Bug Paste a script tag into innerHTML and nothing happens, so people conclude it is safe. An img tag with an onerror handler tells a very different story. Tutorial · 12 min read · August 6, 2026
- CSS Variables: Scoping, Theming and Live Updates A missing custom property does not fall back to the declaration above it. It quietly wipes the whole declaration and takes the inherited value instead. Once you know why, variables stop being mysterious. Tutorial · 10 min read · August 6, 2026
- CSS Dark Mode: Toggle, Storage and No Theme Flash The white flash before your dark theme loads is not a CSS problem. It is a script timing problem, and the fix is one small blocking script in the head that most tutorials leave out. Tutorial · 10 min read · August 6, 2026
- React useRef Explained: A Ref Is Not State Change ref.current and nothing happens on screen. That is not a bug, it is the entire point of the hook, and it is what makes refs useful and dangerous. Tutorial · 10 min read · August 6, 2026
- Debounce vs Throttle: Which One Your Handler Needs Wrapping your handler in debounce and still seeing a request per keystroke? In React the usual cause is that a fresh debounced function is created on every render, so the timer never survives long enough to fire. Comparison · 11 min read · August 6, 2026
- localStorage vs sessionStorage: What Actually Differs You save a user object, read it back, and get the string [object Object]. Web Storage stores nothing but strings, and that one fact explains most of the bugs people hit with it. Comparison · 11 min read · August 6, 2026
- Map and Set in JavaScript: When They Beat Objects Use an object as a lookup table and every key becomes a string. Two different objects used as keys collapse into one entry called [object Object], and nothing warns you. Comparison · 11 min read · August 6, 2026
- 10 JavaScript Projects for Beginners That Teach Real Skills Ten projects that each teach something specific — DOM events, async data, state, storage — rather than ten variations on the same tutorial. Tips & Tricks · 12 min read · August 6, 2026
- JavaScript Interview Questions for Freshers (With Answers) The list is shorter than you think. Interviewers reuse about fifteen questions, and they are checking whether you understand the mechanism or memorised a definition. Career · 12 min read · August 6, 2026
- JavaScript DOM Manipulation for Beginners Selecting elements, changing text and styles, adding and removing nodes, and handling clicks — taught by building a small counter and a to-do widget. Tutorial · 9 min read · July 22, 2026
- How to Build a REST API with Node.js and Express A beginner-friendly, step-by-step tutorial: build a small REST API in Express with working GET, POST, PUT and DELETE routes you can run and test yourself. Tutorial · 9 min read · July 22, 2026
- let vs const vs var in JavaScript: What is the Difference? A beginner-friendly guide to the three ways to declare JavaScript variables — how scope, hoisting, and reassignment differ, plus which one to use. Comparison · 9 min read · July 22, 2026
- What is an API? A Simple Explanation for Beginners An API lets two programs talk to each other. Learn what that means with a simple waiter analogy, plus REST, JSON, status codes, and a real fetch() demo. Tutorial · 9 min read · July 22, 2026
- JavaScript map, filter & reduce Explained (with Examples) map transforms, filter selects, reduce accumulates. See clear, runnable examples of each JavaScript array method, plus chaining and the mistakes to avoid. Tutorial · 9 min read · July 22, 2026
- Python vs JavaScript: Which Should You Learn First? An honest comparison on syntax, jobs, learning curve and where each one actually runs — plus which to pick depending on what you want to build. Comparison · 8 min read · May 7, 2026
- React Hooks: 7 Mistakes That Cause Bugs Stale closures, missing dependencies and effects that fire twice — the seven hook mistakes that produce the most confusing React bugs, and the fix for each. Tutorial · 11 min read · May 7, 2026
- React Hooks Explained Simply: useState, useEffect, useRef Understand React hooks in 10 minutes with practical examples. No jargon, just code that works. Tutorial · 11 min read · May 7, 2026
- Python vs JavaScript: Which Should You Learn First? A detailed comparison of two of the most popular programming languages. We break down use cases, job market, and learning curve. Comparison · 8 min read · May 7, 2026
