<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Javascript on MDT - Personal site</title><link>https://detafti.ir/tags/javascript/</link><description>Recent content in Javascript on MDT - Personal site</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://detafti.ir/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>Example: video note</title><link>https://detafti.ir/notes/example-video/</link><pubDate>Fri, 28 Aug 2026 10:00:00 +0330</pubDate><guid>https://detafti.ir/notes/example-video/</guid><description>&lt;p>This is a starter video note. Copy it, or delete it once you add your own.&lt;/p>
&lt;p>Use &lt;code>note_type = &amp;quot;video&amp;quot;&lt;/code> and put the YouTube URL in &lt;code>source&lt;/code> so the video embeds at the top. Headings like &lt;code>12:40&lt;/code> make timestamped notes easy to scan.&lt;/p>
&lt;h2 id="takeaways">Takeaways&lt;/h2>
&lt;ul>
&lt;li>The browser event loop is a queue: JavaScript runs one thing at a time, then picks the next callback.&lt;/li>
&lt;li>Rendering and I/O are not the same queue as your JS callbacks.&lt;/li>
&lt;li>&lt;code>setTimeout(fn, 0)&lt;/code> does not run immediately; it waits until the current stack is clear.&lt;/li>
&lt;/ul>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;h3 id="0115--call-stack">01:15 — Call stack&lt;/h3>
&lt;p>JS is single-threaded. Each function call is pushed onto the stack and popped when it returns.&lt;/p></description></item></channel></rss>