2 ms·
The reason is that JavaScript runs within the same event loop as the browser GUI itself. The history of JavaScript is that it started as a sort of "quick and d
by pavlov 9y ago
The reason is that JavaScript runs within the same event loop as the browser GUI itself.
The history of JavaScript is that it started as a sort of "quick and dirty" scripting language at Netscape. Creating a completely separate event model wasn't possible in those circumstances, so JavaScript ended up being shaped by the single-threaded lowest common denominator of Win32 and other platforms that Netscape ran on.