{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/understanding-execution-stack-in-javascript/",
    "result": {"data":{"markdownRemark":{"html":"<div class=\"table-of-contents\">\n<ul>\n<li>\n<p><a href=\"#execution-context\">Execution context</a></p>\n</li>\n<li>\n<p><a href=\"#execution-stack\">Execution stack</a></p>\n<ul>\n<li><a href=\"#step-1\">Step-1</a></li>\n<li><a href=\"#step-2\">Step-2</a></li>\n<li><a href=\"#step-3\">Step-3</a></li>\n<li><a href=\"#step-4\">Step-4</a></li>\n<li><a href=\"#step-5\">Step-5</a></li>\n<li><a href=\"#step-6\">Step-6</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<p>In JavaScript, a function can call another function which in turn can call another function and so on. In a script that has multiple functions like this, the JavaScript interpreter (<em>that runs in the web browser</em>) can keep track of its place inside the script through a mechanism called <strong>execution stack</strong>.</p>\n<p>We will understand this concept of execution stack by analyzing the sequence of code execution of the following script.</p>\n<pre class=\"grvsc-container grvsc-has-line-highlighting synthwave-84\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"1\"></span><span class=\"grvsc-source\"><span class=\"mtk10\">const</span><span class=\"mtk1\"> </span><span class=\"mtk3\">name</span><span class=\"mtk1\"> </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk16\">&quot;hemanta&quot;</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"2\"></span><span class=\"grvsc-source\"><span class=\"mtk9\">console</span><span class=\"mtk1\">.</span><span class=\"mtk6\">log</span><span class=\"mtk1\">(</span><span class=\"mtk3\">name</span><span class=\"mtk1\">)</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"3\"></span><span class=\"grvsc-source\"></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"4\"></span><span class=\"grvsc-source\"><span class=\"mtk10\">function</span><span class=\"mtk1\"> </span><span class=\"mtk6\">greetEnglish</span><span class=\"mtk1\">() {</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"5\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk10\">const</span><span class=\"mtk1\"> </span><span class=\"mtk3\">name</span><span class=\"mtk1\"> </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk16\">&quot;Joe&quot;</span></span></span>\n<span class=\"grvsc-line grvsc-line-highlighted\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"6\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk6\">greetFrench</span><span class=\"mtk1\">()</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"7\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk9\">console</span><span class=\"mtk1\">.</span><span class=\"mtk6\">log</span><span class=\"mtk1\">(</span><span class=\"mtk16\">`Good morning </span><span class=\"mtk8\">${</span><span class=\"mtk3\">name</span><span class=\"mtk8\">}</span><span class=\"mtk16\">`</span><span class=\"mtk1\">)</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"8\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">}</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"9\"></span><span class=\"grvsc-source\"></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"10\"></span><span class=\"grvsc-source\"><span class=\"mtk10\">function</span><span class=\"mtk1\"> </span><span class=\"mtk6\">greetFrench</span><span class=\"mtk1\">() {</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"11\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk10\">const</span><span class=\"mtk1\"> </span><span class=\"mtk3\">name</span><span class=\"mtk1\"> </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk16\">&quot;Keith&quot;</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"12\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">  </span><span class=\"mtk9\">console</span><span class=\"mtk1\">.</span><span class=\"mtk6\">log</span><span class=\"mtk1\">(</span><span class=\"mtk16\">`Bonjour </span><span class=\"mtk8\">${</span><span class=\"mtk3\">name</span><span class=\"mtk8\">}</span><span class=\"mtk16\">`</span><span class=\"mtk1\">)</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"13\"></span><span class=\"grvsc-source\"><span class=\"mtk1\">}</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"14\"></span><span class=\"grvsc-source\"></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"15\"></span><span class=\"grvsc-source\"><span class=\"mtk6\">greetEnglish</span><span class=\"mtk1\">()</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"16\"></span><span class=\"grvsc-source\"></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"17\"></span><span class=\"grvsc-source\"><span class=\"mtk10\">const</span><span class=\"mtk1\"> </span><span class=\"mtk3\">prof</span><span class=\"mtk1\"> </span><span class=\"mtk12\">=</span><span class=\"mtk1\"> </span><span class=\"mtk16\">&quot;developer&quot;</span></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"18\"></span><span class=\"grvsc-source\"></span></span>\n<span class=\"grvsc-line\"><span class=\"grvsc-gutter-pad\"></span><span class=\"grvsc-gutter grvsc-line-number\" aria-hidden=\"true\" data-content=\"19\"></span><span class=\"grvsc-source\"><span class=\"mtk9\">console</span><span class=\"mtk1\">.</span><span class=\"mtk6\">log</span><span class=\"mtk1\">(</span><span class=\"mtk3\">prof</span><span class=\"mtk1\">)</span></span></span></code></pre>\n<p>The code above is nothing special. The only thing to note here is that on line 6, we have called/invoked <del>greetFrench</del> function inside the <del>greetEnglish</del> function.</p>\n<h3 id=\"execution-context\" style=\"position:relative;\"><a href=\"#execution-context\" aria-label=\"execution context permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Execution context</h3>\n<p>Before we can understand the concept of execution stack, we need to understand the concept of execution context, which is an environment where JavaScript code gets evaluated and executed.</p>\n<p>When a HTML page loads in the web browser, the JavaScript engine prepares an environment for executing JS code. As part of this environment, global execution context is created. And global execution context in turn creates a global <del>window</del> object (<em>which exists in the global scope</em>) and a special keyword called <del>this</del>, which points to the global <del>window</del> object.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/aac4ebeb45b28e3c19ec0130b35bcf54/63217/execution-context.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQADAAAAAAAAAAAAAAAAAAMBAgX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB72uZJdMtAAf/xAAZEAABBQAAAAAAAAAAAAAAAAAQAAERICH/2gAIAQEAAQUCUjQ1P//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABYQAAMAAAAAAAAAAAAAAAAAAAAwMf/aAAgBAQAGPwIqP//EABsQAAICAwEAAAAAAAAAAAAAAAARASEgMXGB/9oACAEBAAE/IZ6hC4FazyDTD//aAAwDAQACAAMAAAAQlM88/8QAFREBAQAAAAAAAAAAAAAAAAAAESD/2gAIAQMBAT8QI//EABURAQEAAAAAAAAAAAAAAAAAABEg/9oACAECAQE/EGP/xAAbEAEBAAMAAwAAAAAAAAAAAAABEQAxUSBx0f/aAAgBAQABPxAuxg4GJMWPo+YNpyQmyamQrcOWr4f/2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Context\"\n        title=\"Execution Context\"\n        src=\"/static/aac4ebeb45b28e3c19ec0130b35bcf54/a24e6/execution-context.jpg\"\n        srcset=\"/static/aac4ebeb45b28e3c19ec0130b35bcf54/a6b4f/execution-context.jpg 200w,\n/static/aac4ebeb45b28e3c19ec0130b35bcf54/a6407/execution-context.jpg 400w,\n/static/aac4ebeb45b28e3c19ec0130b35bcf54/a24e6/execution-context.jpg 800w,\n/static/aac4ebeb45b28e3c19ec0130b35bcf54/63217/execution-context.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Note that all this happens before execution of any JavaScript code.</p>\n<h3 id=\"execution-stack\" style=\"position:relative;\"><a href=\"#execution-stack\" aria-label=\"execution stack permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Execution stack</h3>\n<p>Now, let's understand step-by-step how our script above gets executed by JavaScript.</p>\n<h4 id=\"step-1\" style=\"position:relative;\"><a href=\"#step-1\" aria-label=\"step 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-1</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9181e8f0d66ea92d68ea430377d0110d/63217/executionStackOne.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAECAwX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB7sUiN1VUgNQf/8QAGhABAQACAwAAAAAAAAAAAAAAAQIAEwMQEf/aAAgBAQABBQLtuR2Rkvo8cLpjAJP/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAaEAADAAMBAAAAAAAAAAAAAAAAARECEDEy/9oACAEBAAY/Ajuo8kekVFaOER//xAAbEAEBAQACAwAAAAAAAAAAAAABABEQQVFh8P/aAAgBAQABPyF17Sx84nwDxQbGk70r7vmsYHAv/9oADAMBAAIAAwAAABAowAD/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAeEAEAAgIBBQAAAAAAAAAAAAABABEhMUFRwdHw8f/aAAgBAQABPxApio8Qt7JHZAJNyLkn1YFA+k0wUm02Lnr8k4yiOk//2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/9181e8f0d66ea92d68ea430377d0110d/a24e6/executionStackOne.jpg\"\n        srcset=\"/static/9181e8f0d66ea92d68ea430377d0110d/a6b4f/executionStackOne.jpg 200w,\n/static/9181e8f0d66ea92d68ea430377d0110d/a6407/executionStackOne.jpg 400w,\n/static/9181e8f0d66ea92d68ea430377d0110d/a24e6/executionStackOne.jpg 800w,\n/static/9181e8f0d66ea92d68ea430377d0110d/63217/executionStackOne.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>We know that when a page gets loaded in the web browser, JavaScript engine creates the global execution context, which manages a script from start to finish and is the first member of the execution stack.</p>\n<p>Global execution context creates memory space for variables and functions. All variables are assigned a default value of <del>undefined</del> and all functions are put into memory in their entirety (i.e. their name + their execution code).</p>\n<p>Then, the syntax parser of the JavaScript engine checks the code line-by-line and if no syntax error is found, Javascript starts execution of the code.</p>\n<h4 id=\"step-2\" style=\"position:relative;\"><a href=\"#step-2\" aria-label=\"step 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-2</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/effa754994fbc8aa034b948ed90f99e9/63217/executionStackTwo.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAAIDAAAAAAAAAAAAAAAAAAECAwQF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAe6wTGyooCQf/8QAHBAAAwACAwEAAAAAAAAAAAAAAAECEiEDEBET/9oACAEBAAEFAtm+vrAuWG5pUsZMZEvD/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGRABAAMBAQAAAAAAAAAAAAAAAAERMRAh/9oACAEBAAY/Au6q1wyGQ8f/xAAeEAEAAgEEAwAAAAAAAAAAAAABABEhEEFhkTFx8f/aAAgBAQABPyFdidQdyaJqOZxBAzeJbmyfKlXjqgCgHqf/2gAMAwEAAgADAAAAECgAPP/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EAB4QAQEAAwABBQAAAAAAAAAAAAERACExEGFxkaHB/9oACAEBAAE/EEugetfuUbHsTxtaCJWn4ykJIFF+s7N8sTeLKrr1nBAiTiHIQnYJn//Z'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/effa754994fbc8aa034b948ed90f99e9/a24e6/executionStackTwo.jpg\"\n        srcset=\"/static/effa754994fbc8aa034b948ed90f99e9/a6b4f/executionStackTwo.jpg 200w,\n/static/effa754994fbc8aa034b948ed90f99e9/a6407/executionStackTwo.jpg 400w,\n/static/effa754994fbc8aa034b948ed90f99e9/a24e6/executionStackTwo.jpg 800w,\n/static/effa754994fbc8aa034b948ed90f99e9/63217/executionStackTwo.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>JavaScript code that is not inside any function runs in the global execution context. After execution of code on lines 1 &#x26; 2, the result <del>hemanta</del> is logged in the console.</p>\n<h4 id=\"step-3\" style=\"position:relative;\"><a href=\"#step-3\" aria-label=\"step 3 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-3</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/5e35b83c4b9b319ceafe18843cc5847a/63217/executionStackThree.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAAAAECBAX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB7rHMblFASD//xAAcEAACAgIDAAAAAAAAAAAAAAABAgAhERIDEBP/2gAIAQEAAQUCuX172ObLKwYarNVgGJ//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAZEAACAwEAAAAAAAAAAAAAAAAAAREgMSH/2gAIAQEABj8CokSjEYjh/8QAHhABAAIBBAMAAAAAAAAAAAAAAQARIRAxQZFRcfH/2gAIAQEAAT8hXgnUHkmiBGMNbQ/IMtzZPlSpx1QBQD1P/9oADAMBAAIAAwAAABAIADz/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAcEAEAAwEAAwEAAAAAAAAAAAABABEhMRBhccH/2gAIAQEAAT8QS4D3b9ljR8K8M81YTyVJDLjOzfV0mxZVdetYAI04hlEJ2hU//9k='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/5e35b83c4b9b319ceafe18843cc5847a/a24e6/executionStackThree.jpg\"\n        srcset=\"/static/5e35b83c4b9b319ceafe18843cc5847a/a6b4f/executionStackThree.jpg 200w,\n/static/5e35b83c4b9b319ceafe18843cc5847a/a6407/executionStackThree.jpg 400w,\n/static/5e35b83c4b9b319ceafe18843cc5847a/a24e6/executionStackThree.jpg 800w,\n/static/5e35b83c4b9b319ceafe18843cc5847a/63217/executionStackThree.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Then, JavaScript engine continues and encounters <del>greetEnglish</del> and <del>greetFrench</del> functions. It does not execute the code inside them, because the functions have simply been declared. They have not been called/invoked yet.</p>\n<p>Thereafter on line 15, JavaScript encounters invocation of the <del>greetEnglish</del> function. Then <del>greetEnglish</del> function becomes active. JavaScript creates an execution context for the function and pushes the context to the top of the execution stack.</p>\n<p>JavaScript executes the code inside the <del>greetEnglish</del> function and encounters invocation of <del>greetFrench</del> function.</p>\n<h4 id=\"step-4\" style=\"position:relative;\"><a href=\"#step-4\" aria-label=\"step 4 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-4</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9f240c0dca701d27d9c80a76960a5e5b/63217/executionStackFour.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAUDAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAG6nIpsVaA6D//EABoQAAIDAQEAAAAAAAAAAAAAAAECABEhEhD/2gAIAQEAAQUC2b4X0PbJRHKzlYBU/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAGhAAAgMBAQAAAAAAAAAAAAAAAAERITECEP/aAAgBAQAGPwL12JSV1JiMRR//xAAdEAEAAgICAwAAAAAAAAAAAAABABEhkRBRMXHx/9oACAEBAAE/IXomodq1wIV/MKw5Zm2Fz5UqcaoAoB6n/9oADAMBAAIAAwAAABAbADz/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAcEAEAAwEAAwEAAAAAAAAAAAABABEhMRBBYXH/2gAIAQEAAT8QTcB9tFbS/KeEtiygWtnr8nEl7m62zYsquvWsAEacQyiE7Qqf/9k='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/9f240c0dca701d27d9c80a76960a5e5b/a24e6/executionStackFour.jpg\"\n        srcset=\"/static/9f240c0dca701d27d9c80a76960a5e5b/a6b4f/executionStackFour.jpg 200w,\n/static/9f240c0dca701d27d9c80a76960a5e5b/a6407/executionStackFour.jpg 400w,\n/static/9f240c0dca701d27d9c80a76960a5e5b/a24e6/executionStackFour.jpg 800w,\n/static/9f240c0dca701d27d9c80a76960a5e5b/63217/executionStackFour.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Then JavaScript creates an execution context for the <del>greetFrench</del> function and pushes it to the top of the execution stack. <del>greetFrench</del> function becomes active. JavaScript executes the code inside it and logs in <del>Bonjour Keith</del> to the console.</p>\n<h4 id=\"step-5\" style=\"position:relative;\"><a href=\"#step-5\" aria-label=\"step 5 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-5</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/b9c266b2c652d0b2401e017db408d8c1/63217/executionStackFive.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAQBBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHuo0XJVUA0H//EAB0QAAEDBQEAAAAAAAAAAAAAAAABAiEDEBESEyL/2gAIAQEAAQUCkm3ee2Sl6bq01aImD//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABoQAAICAwAAAAAAAAAAAAAAAAABEDERICH/2gAIAQEABj8C0xFIpHD/xAAdEAEAAgICAwAAAAAAAAAAAAABABEhQTGREHHx/9oACAEBAAE/IV0TqDsnhAjGGuIW13E2DeZ8qVcdUAUA9T//2gAMAwEAAgADAAAAEAvAPP/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABwQAQADAQEAAwAAAAAAAAAAAAEAESExYRBxwf/aAAgBAQABPxBLgPbfssaPor4Z5qwnkEQLyYkUuFi18IsquvWsECNOIZRi9oVP/9k='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/b9c266b2c652d0b2401e017db408d8c1/a24e6/executionStackFive.jpg\"\n        srcset=\"/static/b9c266b2c652d0b2401e017db408d8c1/a6b4f/executionStackFive.jpg 200w,\n/static/b9c266b2c652d0b2401e017db408d8c1/a6407/executionStackFive.jpg 400w,\n/static/b9c266b2c652d0b2401e017db408d8c1/a24e6/executionStackFive.jpg 800w,\n/static/b9c266b2c652d0b2401e017db408d8c1/63217/executionStackFive.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Because there is no more code to run inside the <del>greetFrench</del> function, <del>greetFrench</del> function execution context gets popped off the execution stack and JavaScript returns back control to the calling function - <del>greetEnglish</del> function. <del>greetEnglish</del> function becomes the active function and JavaScript continues executing the rest of the code inside it. JavaScript executes the code on line 7 and logs in <del>Good morning Joe</del> to the console.</p>\n<h4 id=\"step-6\" style=\"position:relative;\"><a href=\"#step-6\" aria-label=\"step 6 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step-6</h4>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/0d9dbd2f7060d36aa5f353ae72879e50/63217/executionStackSix.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 100%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAAIDAAAAAAAAAAAAAAAAAAMEAQIF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAe6r6RdQKmBkH//EABsQAAICAwEAAAAAAAAAAAAAAAECAAMQERMh/9oACAEBAAEFAvYMdkjWqVWwEamsf//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABYQAQEBAAAAAAAAAAAAAAAAACABIf/aAAgBAQAGPwIZT//EABwQAQADAAIDAAAAAAAAAAAAAAEAESFBURAxYf/aAAgBAQABPyFeFRPNeEFLc+RFdZvqFdcxlOiU6JRP/9oADAMBAAIAAwAAABB7zwD/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAdEAEAAgICAwAAAAAAAAAAAAABABEhMRCRQWHR/9oACAEBAAE/ELfh93EtdV8Ly9I57JrEqyMXUq5HYHdS/wCRAddUA0HU/9k='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Execution Stack\"\n        title=\"Execution Stack\"\n        src=\"/static/0d9dbd2f7060d36aa5f353ae72879e50/a24e6/executionStackSix.jpg\"\n        srcset=\"/static/0d9dbd2f7060d36aa5f353ae72879e50/a6b4f/executionStackSix.jpg 200w,\n/static/0d9dbd2f7060d36aa5f353ae72879e50/a6407/executionStackSix.jpg 400w,\n/static/0d9dbd2f7060d36aa5f353ae72879e50/a24e6/executionStackSix.jpg 800w,\n/static/0d9dbd2f7060d36aa5f353ae72879e50/63217/executionStackSix.jpg 1024w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>There is no more code to run inside the <del>greetEnglish</del> function. As a result, <del>greetEnglish</del> function gets popped off the execution stack and global execution context continues executing rest of the code inside the script. And on line 19, we get <del>developer</del> as the output in the console, marking the completion of the execution of our script.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    position: relative;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n    line-height: 1.4;\n  }\n  \n  .grvsc-code {\n    display: table;\n  }\n  \n  .grvsc-line {\n    display: table-row;\n    box-sizing: border-box;\n    width: 100%;\n    position: relative;\n  }\n  \n  .grvsc-line > * {\n    position: relative;\n  }\n  \n  .grvsc-gutter-pad {\n    display: table-cell;\n    padding-left: 0.75rem;\n    padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);\n  }\n  \n  .grvsc-gutter {\n    display: table-cell;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    user-select: none;\n  }\n  \n  .grvsc-gutter::before {\n    content: attr(data-content);\n  }\n  \n  .grvsc-source {\n    display: table-cell;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-source:empty::after {\n    content: ' ';\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    user-select: none;\n  }\n  \n  .grvsc-gutter + .grvsc-source {\n    padding-left: 0.75rem;\n    padding-left: calc(var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem)) / 2);\n  }\n  \n  /* Line transformer styles */\n  \n  .grvsc-has-line-highlighting > .grvsc-code > .grvsc-line::before {\n    content: ' ';\n    position: absolute;\n    width: 100%;\n  }\n  \n  .grvsc-line-diff-add::before {\n    background-color: var(--grvsc-line-diff-add-background-color, rgba(0, 255, 60, 0.2));\n  }\n  \n  .grvsc-line-diff-del::before {\n    background-color: var(--grvsc-line-diff-del-background-color, rgba(255, 0, 20, 0.2));\n  }\n  \n  .grvsc-line-number {\n    padding: 0 2px;\n    text-align: right;\n    opacity: 0.7;\n  }\n  \n  .synthwave-84 { background-color: #262335; }\n  .synthwave-84 .mtk10 { color: #FEDE5D; }\n  .synthwave-84 .mtk1 { color: #FFFFFF; }\n  .synthwave-84 .mtk3 { color: #FF7EDB; }\n  .synthwave-84 .mtk12 { color: #FFFFFFEE; }\n  .synthwave-84 .mtk16 { color: #FF8B39; }\n  .synthwave-84 .mtk9 { color: #FE4450; }\n  .synthwave-84 .mtk6 { color: #36F9F6; }\n  .synthwave-84 .mtk8 { color: #72F1B8; }\n  .synthwave-84 .grvsc-line-highlighted::before {\n    background-color: var(--grvsc-line-highlighted-background-color, rgba(255, 255, 255, 0.1));\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, rgba(255, 255, 255, 0.5));\n  }\n</style>","frontmatter":{"title":"Understanding Execution Stack in JavaScript","date":"2021-05-26"}}},"pageContext":{"slug":"/understanding-execution-stack-in-javascript/","prev":{"fields":{"slug":"/objects-vs-primitives-in-javascript/"},"frontmatter":{"modules":null}},"next":{"fields":{"slug":"/gsap-scrolltrigger-notes/"},"frontmatter":{"modules":null}}}},
    "staticQueryHashes": ["3159585216"]}