<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>JavaScript on Spaghetti Code 🍝</title>
    <link>https://spaghetti-code.net/en/tags/javascript/</link>
    <description>Recent content in JavaScript on Spaghetti Code 🍝</description>
    <image>
      <title>Spaghetti Code 🍝</title>
      <url>https://spaghetti-code.net/images/og-default.png</url>
      <link>https://spaghetti-code.net/images/og-default.png</link>
    </image>
    <generator>Hugo -- 0.160.0</generator>
    <language>en</language>
    <lastBuildDate>Sun, 01 Nov 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://spaghetti-code.net/en/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ESLint vs Prettier: What Each Does and How to Combine Them</title>
      <link>https://spaghetti-code.net/en/posts/javascript/eslint-vs-prettier/</link>
      <pubDate>Sun, 01 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/eslint-vs-prettier/</guid>
      <description>ESLint catches bugs and bad patterns in your code; Prettier only reformats it. Here is why running both together causes conflicts, and the setup that avoids it.</description>
    </item>
    <item>
      <title>React useEffect Explained: Dependency Arrays and Cleanup</title>
      <link>https://spaghetti-code.net/en/posts/react/react-useeffect-explained/</link>
      <pubDate>Thu, 29 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/react/react-useeffect-explained/</guid>
      <description>How React&amp;#39;s useEffect dependency array works, why effects fire twice in development, what the cleanup function actually does, and the mistakes that cause loops.</description>
    </item>
    <item>
      <title>Regular Expressions Explained: How Regex Really Works</title>
      <link>https://spaghetti-code.net/en/posts/fundamentals/regular-expressions-explained/</link>
      <pubDate>Wed, 28 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/fundamentals/regular-expressions-explained/</guid>
      <description>A regex engine doesn&amp;#39;t scan the whole string at once. It walks the pattern token by token and backtracks on failure. How that works, and why it sometimes hangs.</description>
    </item>
    <item>
      <title>TypeScript Generics Explained With Examples</title>
      <link>https://spaghetti-code.net/en/posts/typescript/typescript-generics-explained/</link>
      <pubDate>Tue, 27 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/typescript/typescript-generics-explained/</guid>
      <description>TypeScript generics keep the type you pass in instead of collapsing it to any. How inference, extends, keyof and defaults work, and when to skip generics.</description>
    </item>
    <item>
      <title>Intersection Observer API: Lazy Loading and Infinite Scroll</title>
      <link>https://spaghetti-code.net/en/posts/javascript/intersection-observer-api/</link>
      <pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/intersection-observer-api/</guid>
      <description>How the Intersection Observer API replaces scroll-and-debounce code for lazy-loaded images and infinite scroll, with rootMargin and threshold explained.</description>
    </item>
    <item>
      <title>JavaScript Closures Explained With Examples</title>
      <link>https://spaghetti-code.net/en/posts/javascript/javascript-closures-explained/</link>
      <pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/javascript-closures-explained/</guid>
      <description>A JavaScript closure keeps a function tied to the variables where it was created, even after that code returns. How closures work, and where they break.</description>
    </item>
    <item>
      <title>npm vs Yarn vs pnpm: Which Package Manager to Use</title>
      <link>https://spaghetti-code.net/en/posts/nodejs/npm-vs-yarn-vs-pnpm/</link>
      <pubDate>Sat, 17 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/nodejs/npm-vs-yarn-vs-pnpm/</guid>
      <description>npm, Yarn, and pnpm read the same package.json but build node_modules differently. Compare install commands, lockfiles, workspaces, and when each breaks.</description>
    </item>
    <item>
      <title>JavaScript Fetch API Error Handling Explained</title>
      <link>https://spaghetti-code.net/en/posts/javascript/fetch-api-error-handling/</link>
      <pubDate>Wed, 14 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/fetch-api-error-handling/</guid>
      <description>fetch() resolves on 404 and 500 responses instead of rejecting, so a plain try/catch misses them. How to check response.ok, read error bodies, and add timeouts.</description>
    </item>
    <item>
      <title>Debounce vs Throttle in JavaScript: When to Use Each</title>
      <link>https://spaghetti-code.net/en/posts/javascript/debounce-vs-throttle-javascript/</link>
      <pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/debounce-vs-throttle-javascript/</guid>
      <description>Debounce vs throttle in JavaScript: debounce waits until events stop firing, throttle runs at a steady rate while they continue. How each works, which to use.</description>
    </item>
    <item>
      <title>LocalStorage vs SessionStorage vs Cookies: What to Use</title>
      <link>https://spaghetti-code.net/en/posts/web/localstorage-vs-sessionstorage-vs-cookies/</link>
      <pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/web/localstorage-vs-sessionstorage-vs-cookies/</guid>
      <description>Cookies, localStorage, and sessionStorage all hold data in the browser, but only cookies reach your server. Here is how to pick the right one and secure it.</description>
    </item>
    <item>
      <title>JavaScript Async/Await and the Event Loop Explained</title>
      <link>https://spaghetti-code.net/en/posts/javascript/javascript-async-await-event-loop/</link>
      <pubDate>Mon, 28 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://spaghetti-code.net/en/posts/javascript/javascript-async-await-event-loop/</guid>
      <description>How JavaScript async/await runs on the event loop, why a promise callback beats setTimeout(0), and the fixes for missing awaits, slow loops and async forEach.</description>
    </item>
  </channel>
</rss>
