<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vinayak</title>
    <description>The latest articles on DEV Community by Vinayak (@vinayak_402de17b101a0b7ee).</description>
    <link>https://dev.to/vinayak_402de17b101a0b7ee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4049267%2Fc0f18955-3a62-43c8-9c10-e04257cfce85.png</url>
      <title>DEV Community: Vinayak</title>
      <link>https://dev.to/vinayak_402de17b101a0b7ee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinayak_402de17b101a0b7ee"/>
    <language>en</language>
    <item>
      <title>JavaScript - an interpreted or compiled language ?</title>
      <dc:creator>Vinayak</dc:creator>
      <pubDate>Sat, 15 Aug 2026 13:29:25 +0000</pubDate>
      <link>https://dev.to/vinayak_402de17b101a0b7ee/javascript-an-interpreted-or-compiled-language--3ic6</link>
      <guid>https://dev.to/vinayak_402de17b101a0b7ee/javascript-an-interpreted-or-compiled-language--3ic6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;JavaScript historically used to be an interpreted language, however due to its growing use in web development and the increasing complexity of websites, modern JavaScript uses a mix of interpretation and compilation for faster execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps in execution of JavaScript code
&lt;/h2&gt;

&lt;p&gt;Here we will be discussing a high overview of execution of JS code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; The first step in execution of JavaScript is the parsing of JS code and its conversion into an Abstract Syntax Tree (AST) containing all the information about the code including (but not limited to) : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;type&lt;/em&gt; : whether a particular line of code was an if statement, function declaration or a variable declaration.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;location&lt;/em&gt; : where that line of code was located in the complete code
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;operators&lt;/em&gt; : operators used in the code  &lt;/p&gt;

&lt;p&gt;All the comments, whitespaces, indentations are gone in this step.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; In the second step the AST is compiled into unoptimised byte code (note : bytecode != machine code).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; After that the bytecode is interpreted i.e. the byte code is executed instruction by instruction&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4)&lt;/strong&gt; Now while the bytecode is being executed the JavaScript engiene keeps applying optimisations so that the code can be executed rapidly. This is called Just In Time Compilation (JIT Compilation)&lt;/p&gt;

&lt;p&gt;Below is a diagram illustrating the above steps&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1d4v81l4omhyu0nwn6i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1d4v81l4omhyu0nwn6i3.png" alt="an image illustrating the above steps" width="800" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A side note
&lt;/h2&gt;

&lt;p&gt;What we discussed above was a general flow that JS Engines use while executing JavaScript code, different JS Engines might implement it differently however the overall high level flow mostly remains the same.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
