<?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 Dev Toolkit</title><link>https://wen.yunshangtool.cn/tags/javascript/</link><description>Recent content in JavaScript on Dev Toolkit</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 12 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://wen.yunshangtool.cn/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>Understanding JavaScript Event Loop and Async Patterns</title><link>https://wen.yunshangtool.cn/posts/javascript-event-loop/</link><pubDate>Fri, 12 Jun 2026 00:00:00 +0000</pubDate><guid>https://wen.yunshangtool.cn/posts/javascript-event-loop/</guid><description>The JavaScript event loop is the backbone of asynchronous programming in JS. Understanding how microtasks and macrotasks work is essential for writing performant code.
What is the Event Loop? The event loop continuously checks the call stack and the task queue. When the call stack is empty, it takes the first task from the queue and pushes it onto the stack.
Microtasks vs Macrotasks: Promise.then() callbacks go to the microtask queue, while setTimeout callbacks go to the macrotask queue.</description></item></channel></rss>