DEV Community

loading...

Beginner JavaScript - 2 - How JS Code is Executed in the browser ?

The Nerdy Dev
Building products is my profession, Creating content is my passion. We believe that Education should be freely accessible to everyone and no one should be deprived of it.
・Updated on ・1 min read

Hey everyone πŸ‘‹πŸ»,

In this article, let us discuss about how JS Code is Executed in the browser. This is the second part of my Beginner JavaScript Series on Dev.

How JS Code is Executed inside the browser ?

The source code that you and I write is first passed through a program called a compiler, which in turn translates it into something called as the bytecode which the machine can understand and execute.

Contrary to this, JavaScript has no compilation step. Instead, an interpreter in the browser goes over your entire JavaScript code, interprets it line by line, and then runs it.
Some of the more modern browsers use a technology known as Just-In-Time compilation, which compiles JavaScript to executable bytecode just when it is about to run.

Alt Text

Alt Text

Check this video where I explain How JavaScript Code is Executed in Browser

So this was it for this one.

If you are looking to learn Web Development, I have curated a FREE course for you on my YouTube Channel, check the below article :

Spare 2 Hours ? If so, utilize them by creating these 10 JavaScript Projects in under 2 Hours

πŸ‘‰πŸ» Follow me on Twitter : https://twitter.com/The_Nerdy_Dev

πŸ‘‰πŸ» Check out my YouTube Channel : https://youtube.com/thenerdydev

Discussion (0)