๐—›๐—ผ๐˜„ ๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ ๐—ฅ๐˜‚๐—ป๐˜€ ๐—ถ๐—ป ๐˜๐—ต๐—ฒ ๐—•๐—ฟ๐—ผ๐˜„๐˜€๐—ฒ๐—ฟ

JavaScript does not run alone. It needs a runtime. You find this in browsers and Node.js.

Chrome uses the V8 engine. V8 handles four main tasks:

V8 uses Just-In-Time compilation. It optimizes code while the app runs. This makes your app faster over time.

V8 handles the logic. The browser handles the rest. The browser provides:

Node.js also uses V8. It lacks a DOM and a rendering engine. It uses OS APIs to read files and open network connections.

Use Chrome DevTools to find performance bugs. The Performance tab shows the truth:

Stop guessing why your page is slow. Use data to fix your app. Know if the main thread is blocked or if rendering takes too long.

Source: https://dev.to/bysontech_8dd1313811a8895/how-javascript-actually-runs-in-the-browser-v8-dom-rendering-and-devtools-4i8a