<?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: Elvis Ibarra 🐃</title>
    <description>The latest articles on DEV Community by Elvis Ibarra 🐃 (@eltoritoelvis).</description>
    <link>https://dev.to/eltoritoelvis</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F226813%2Fa5c55430-5e73-4899-b076-81aaf092e465.jpg</url>
      <title>DEV Community: Elvis Ibarra 🐃</title>
      <link>https://dev.to/eltoritoelvis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eltoritoelvis"/>
    <language>en</language>
    <item>
      <title>Hoisting, Scope, &amp; Closures  - Let's Build a House.  </title>
      <dc:creator>Elvis Ibarra 🐃</dc:creator>
      <pubDate>Mon, 20 Jul 2020 17:30:37 +0000</pubDate>
      <link>https://dev.to/eltoritoelvis/hoisting-scope-closures-let-s-build-a-house-5hhk</link>
      <guid>https://dev.to/eltoritoelvis/hoisting-scope-closures-let-s-build-a-house-5hhk</guid>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;a href="https://unsplash.com/s/photos/house?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Photo by: Jacques Bopp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before we get started the material/demos I used in this article are from - &lt;a href="https://ui.dev/ultimate-guide-to-execution-contexts-hoisting-scopes-and-closures-in-javascript/"&gt;Tyler McGinnis' &lt;em&gt;The Ultimate Guide to Hoisting, Scopes, and Closures in JavaScript&lt;/em&gt;&lt;/a&gt;. I tried to summarize the material as I understand it and tweaked the demos a bit to make the house metaphor work but his article is much more detailed and I highly encourage you check it out if you haven't already. Ok, let's jump in.&lt;/p&gt;

&lt;p&gt;Before we get to hoisting, scope &amp;amp; closures, let's talk about &lt;strong&gt;Execution Context&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execution Context&lt;/strong&gt; context refers to how and which part of your code is currently active or accessible.&lt;/p&gt;

&lt;p&gt;When you execute or run a JavaScript program the first &lt;strong&gt;Execution Context&lt;/strong&gt; gets created and we can imagine as starting in an empty room-less house.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OeTpus3v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8iu20xisboj90vinip5p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OeTpus3v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8iu20xisboj90vinip5p.jpg" alt="Empty white room"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://unsplash.com/@stevenungermann?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Photo by: Steven Ungermann&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Initially our Execution Context is going to have two things. A global object (the empty room-less house) and a variable (something that can change) named &lt;strong&gt;this&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The name of our house is &lt;code&gt;window&lt;/code&gt; when JavaScript runs in the browser.&lt;/p&gt;

&lt;p&gt;Let's look at an example for what we see when we start JavaScript without any code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NY0rL6Zh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05p40ty3c7n2ftv3ffww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NY0rL6Zh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/05p40ty3c7n2ftv3ffww.png" alt="No code, window &amp;amp; this created"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, even without any code 2 things are created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;window&lt;/code&gt; - The empty house or global object.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; - Our first variable which references (points to) our house.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is our most simple Global Execution Context.&lt;/p&gt;

&lt;p&gt;We haven't actually written any code yet. Let's fix that and begin to modify and do things in our house (Global Execution Context).&lt;/p&gt;

&lt;h2&gt;
  
  
  Execution Context Phases
&lt;/h2&gt;

&lt;p&gt;Let's start by defining 3 variables that describe our house and running our code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Wow, what a nice &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; roof on that &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; house! 👀&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Every execution context is going to run in two steps. A &lt;code&gt;Creation&lt;/code&gt; phase &amp;amp; an &lt;code&gt;Execution&lt;/code&gt; phase:&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1 - Creation Phase
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TWd22613--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zriagm3p1as3hvvx15m0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TWd22613--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zriagm3p1as3hvvx15m0.png" alt="roofColor &amp;amp; wallColor are undefined in the Creation step"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another view:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NyzoiHVx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dwu4gul1v5vij9kuqbfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NyzoiHVx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dwu4gul1v5vij9kuqbfw.png" alt="roofColor &amp;amp; wallColor are undefined in the Creation step"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2 - Execution Phase Phase
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XOLF7-pL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5rgkegb2k3ewbhswro2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XOLF7-pL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5rgkegb2k3ewbhswro2j.png" alt="roofColor is pink &amp;amp; wallColor is white"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another view:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q3zBUA5P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2wxaknpl2wahv0r6dqoi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q3zBUA5P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2wxaknpl2wahv0r6dqoi.png" alt="roofColor is pink &amp;amp; wallColor is white"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Global Execution Context's &lt;code&gt;Creation&lt;/code&gt; phase, JavaScript will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a global object, our house named &lt;code&gt;window&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create an object called &lt;code&gt;this&lt;/code&gt; that references our house (&lt;code&gt;window&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Set up memory space for variables and functions (I'll explain how these can be thought of as rooms in our house soon!).&lt;/li&gt;
&lt;li&gt;Assign variable declarations a default value of “undefined”.&lt;/li&gt;
&lt;li&gt;Place functions in memory (put the rooms in the house)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that JavaScript has prepared our house and the variables that we will need we can move onto the &lt;code&gt;Execution&lt;/code&gt; phase which is where we step through our code one line at a time until we finish.&lt;/p&gt;

&lt;p&gt;The gifs below shows this process:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5n0X7hbY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rebf93ygqqz0iu7avm53.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5n0X7hbY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rebf93ygqqz0iu7avm53.gif" alt="code execution - variables go from undefined to defined."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CKgPBAub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2na11s7l214hxee4h09d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CKgPBAub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2na11s7l214hxee4h09d.gif" alt="code execution - variables go from undefined to defined."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To recap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We created a Global Execution Context with 2 variables (&lt;code&gt;roofColor&lt;/code&gt; &amp;amp; &lt;code&gt;wallColor&lt;/code&gt;) and a function (&lt;code&gt;getHouseDescriptionRoom&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;During the &lt;code&gt;Creation&lt;/code&gt; phase of our Global Execution Context JavaScript the two variables we created are assigned an inital value of &lt;code&gt;undefined&lt;/code&gt; and third variable &lt;code&gt;getHouseDescriptionRoom&lt;/code&gt; is created to store our function.&lt;/li&gt;
&lt;li&gt;During the &lt;code&gt;Execution&lt;/code&gt; phase our code gets ran line by line and the variables get assigned their values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try the code out for yourself and give it a shot!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=var%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow%2C%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house%21%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=var%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow,%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house!%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's look a little more closely at the &lt;code&gt;Creation&lt;/code&gt; vs &lt;code&gt;Execution&lt;/code&gt; phase. We are going to log(print) some values to the screen after the &lt;code&gt;Creation&lt;/code&gt; phase but before they have gone through the &lt;code&gt;Execution&lt;/code&gt; phase. Then we will log their values after the &lt;code&gt;Execution&lt;/code&gt; phase.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// After Creation but before Execution&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;roofColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wallColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;getHouseDescriptionRoom: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Execution step for our variables &amp;amp; Function&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Wow, what a nice &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; roof on that &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; house! 👀&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// After Creation and after Execution&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;roofColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wallColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;getHouseDescriptionRoom: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Before scrolling further spend some time looking at the code above and try to think about what is going to get logged to the console.&lt;/p&gt;

&lt;p&gt;Here is the code you can play with for yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=%2F%2F%20After%20Creation%20but%20before%20Execution%0Aconsole.log%28%22roofColor%3A%20%22%2C%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22%2C%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22%2C%20getHouseDescriptionRoom%29%3B%0A%0A%2F%2F%20Execution%20step%20for%20our%20variables%20%26%20Function%0Avar%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow%2C%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house%21%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D%0A%0A%2F%2F%20After%20Creation%20and%20after%20Execution%0Aconsole.log%28%22roofColor%3A%20%22%2C%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22%2C%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22%2C%20getHouseDescriptionRoom%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=//%20After%20Creation%20but%20before%20Execution%0Aconsole.log%28%22roofColor%3A%20%22,%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22,%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22,%20getHouseDescriptionRoom%29%3B%0A%0A//%20Execution%20step%20for%20our%20variables%20%26%20Function%0Avar%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow,%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house!%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D%0A%0A//%20After%20Creation%20and%20after%20Execution%0Aconsole.log%28%22roofColor%3A%20%22,%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22,%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22,%20getHouseDescriptionRoom%29%3B&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is what get's logged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// After Creation but before Execution&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;roofColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// roofColor:  undefined&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wallColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// wallColor:  undefined&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;getHouseDescriptionRoom: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// getHouseDescriptionRoom:  function getHouseDescriptionRoom() { return "Wow, what a nice " + roofColor + " roof on that " + wallColor +  " house! 👀"; }&lt;/span&gt;

&lt;span class="c1"&gt;// Execution step for our variables &amp;amp; Function&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Wow, what a nice &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;roofColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; roof on that &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;wallColor&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; house! 👀&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// After Creation and after Execution&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;roofColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;roofColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// roofColor:  pink&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wallColor: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wallColor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// wallColor:  white&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;getHouseDescriptionRoom: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getHouseDescriptionRoom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// getHouseDescriptionRoom:  function getHouseDescriptionRoom() { return "Wow, what a nice " + roofColor + " roof on that " + wallColor +  " house! 👀"; }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;As we can see after the &lt;code&gt;Creation&lt;/code&gt; step our variables &lt;code&gt;roofColor&lt;/code&gt; &amp;amp; &lt;code&gt;wallColor&lt;/code&gt; are &lt;code&gt;undefined&lt;/code&gt; as this is how they are initialized.&lt;/p&gt;

&lt;p&gt;Once they are defined in the &lt;code&gt;Execution&lt;/code&gt; step we then log their values which are now defined. This process of assigning values to variables during the &lt;code&gt;Creation&lt;/code&gt; is referred to as &lt;code&gt;Hoisting&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To be clear, when the program is runs/executes and we read or step over line 1, &lt;code&gt;Creation Phase&lt;/code&gt; has already happened which is why the variables are undefined on the right in the Global Execution Context at this point. &lt;code&gt;Execution Phase&lt;/code&gt; is when the program is running so the variables then get defined in the global frame after you step over lines 7 and 8. The variables here exist in the Global Execution Context which is why they are defined and available to use without having to call or invoke &lt;code&gt;getHouseDescriptionRoom&lt;/code&gt;. You don't have to call a method for the variables in the Global Execution Context to be defined and available but they will only be so after the &lt;code&gt;Creation Phase&lt;/code&gt; which happens in the background in preparation for the program to enter &lt;code&gt;Execution Phase&lt;/code&gt; where line 1 begins.&lt;/p&gt;

&lt;p&gt;Next, we'll explore Function Execution Context and begin to add rooms to our house (&lt;code&gt;window&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Function Execution Context
&lt;/h2&gt;

&lt;p&gt;Now we're going to use what we learned about the Global Execution Context to learn how Functions have their own Execution Context which we can think of as rooms in the house built for a specific purpose. A Function Execution Context is created whenever a function is &lt;em&gt;invoked&lt;/em&gt; or &lt;em&gt;called&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;An Execution Context only gets created at the initialization of the JavaScript engine (Global Execution Context) and whenever a function is &lt;em&gt;invoked&lt;/em&gt; (Function Execution Context).&lt;/p&gt;

&lt;p&gt;So what's the difference between a Global Execution Context and a Function Execution Context? Let's take a look at the &lt;code&gt;Creation&lt;/code&gt; phase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;del&gt;global&lt;/del&gt; argument object, variables we can take into or that exist in the room.&lt;/li&gt;
&lt;li&gt;Create an object called &lt;code&gt;this&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set up memory space for variables and functions.&lt;/li&gt;
&lt;li&gt;Assign variable declarations a default value of “undefined”.&lt;/li&gt;
&lt;li&gt;Place functions in memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The only difference is that instead of a global object (&lt;code&gt;window&lt;/code&gt;) getting created (we already have that) we create an arguments object which consists of variables we can take into or that exist in the room.&lt;/p&gt;

&lt;p&gt;To see this in action let's take a look at what our code looks like when we &lt;em&gt;invoke&lt;/em&gt; or step into our &lt;code&gt;getHouseDescriptionRoom&lt;/code&gt; by adding this to our original code at the end: &lt;code&gt;getHouseDescriptionRoom()&lt;/code&gt;. If you look back at the code you'll see that the only thing that happens when we visit this room in our house is that we return with a string that describes the house by using the variables in the Global Execution Context&lt;/p&gt;

&lt;h5&gt;
  
  
  Global Execution Context Creation Phase
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--meaHJX6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/drw7wp6ssaeqw8ddq1tn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--meaHJX6b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/drw7wp6ssaeqw8ddq1tn.png" alt="During Creation Phase roofColor and wallColor are undefined"&gt;&lt;/a&gt;&lt;br&gt;
Another view:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hBZH0jTt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kkd6vm5rho7ofim1ucia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hBZH0jTt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kkd6vm5rho7ofim1ucia.png" alt="During Creation Phase roofColor and wallColor are undefined"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  Global Execution Phase Before &lt;code&gt;getHouseDescriptionRoom&lt;/code&gt; is invoked
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NeAL_AQO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc87gvnlglh89h6cej1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NeAL_AQO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc87gvnlglh89h6cej1l.png" alt="During Global Execution Phase Before `getHouseDescriptionRoom` is invoked roofColor and wallColor are undefined"&gt;&lt;/a&gt;&lt;br&gt;
Another view:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YJVWh2ou--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yr0fggxml5004t7e83i6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YJVWh2ou--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yr0fggxml5004t7e83i6.png" alt="During Global Execution Phase Before `getHouseDescriptionRoom` is invoked roofColor and wallColor are undefined"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  Function Execution Context Creation Phase
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9ZN0v3f_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lmkyx00z8g1p0cnxk5o5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9ZN0v3f_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lmkyx00z8g1p0cnxk5o5.png" alt="During Function Execution Context Creation Phase 0 arguments"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C8V_SExU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hysi4w4n0cgiuxaezcnd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C8V_SExU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hysi4w4n0cgiuxaezcnd.png" alt="During Function Execution Context Creation Phase 0 arguments"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5&gt;
  
  
  Function Execution Context Execution Phase
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ibIbxx6Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u4kgj6l4u6sg57hx93xw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ibIbxx6Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u4kgj6l4u6sg57hx93xw.png" alt="Function Execution Context Execution Phase 0 arguments"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jy-A8xXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mnae9j4gjiwab8dfjyqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jy-A8xXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mnae9j4gjiwab8dfjyqw.png" alt="Function Execution Context Execution Phase 0 arguments"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step through the code yourself here:&lt;/p&gt;

&lt;p&gt;Here is the code you can play with for yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=%2F%2F%20After%20Creation%20but%20before%20Execution%0Aconsole.log%28%22roofColor%3A%20%22%2C%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22%2C%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22%2C%20getHouseDescriptionRoom%29%3B%0A%0A%2F%2F%20Execution%20step%20for%20our%20variables%20%26%20Function%0Avar%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow%2C%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house%21%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D%0A%0A%2F%2F%20After%20Creation%20and%20after%20Execution%0Aconsole.log%28%22roofColor%3A%20%22%2C%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22%2C%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22%2C%20getHouseDescriptionRoom%29%3B%0A%0AgetHouseDescriptionRoom%28%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=//%20After%20Creation%20but%20before%20Execution%0Aconsole.log%28%22roofColor%3A%20%22,%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22,%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22,%20getHouseDescriptionRoom%29%3B%0A%0A//%20Execution%20step%20for%20our%20variables%20%26%20Function%0Avar%20roofColor%20%3D%20%22pink%22%3B%0Avar%20wallColor%20%3D%20%22white%22%3B%0A%0Afunction%20getHouseDescriptionRoom%28%29%20%7B%0A%20%20return%20%28%0A%20%20%20%20%22Wow,%20what%20a%20nice%20%22%20%2B%0A%20%20%20%20roofColor%20%2B%0A%20%20%20%20%22%20roof%20on%20that%20%22%20%2B%0A%20%20%20%20wallColor%20%2B%0A%20%20%20%20%22%20house!%20%F0%9F%91%80%22%0A%20%20%29%3B%0A%7D%0A%0A//%20After%20Creation%20and%20after%20Execution%0Aconsole.log%28%22roofColor%3A%20%22,%20roofColor%29%3B%0Aconsole.log%28%22wallColor%3A%20%22,%20wallColor%29%3B%0Aconsole.log%28%22getHouseDescriptionRoom%3A%20%22,%20getHouseDescriptionRoom%29%3B%0A%0AgetHouseDescriptionRoom%28%29&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing to notice is that this function does not take any variables which is why the arguments object is empty. Another thing to notice is that once the &lt;code&gt;getHouseDescriptionRoom&lt;/code&gt; is finished running it is removed from the visualizations. This represents the function being removed from the &lt;code&gt;Execution/Call Stack&lt;/code&gt;. JavaScript uses this to order and execute functions one at a time. These are in the &lt;em&gt;Frames&lt;/em&gt; column of the JavaScript Tutor visualizer. With “JavaScript Visualizer” the Execution Stack is shown in a nested fashion. You can think of this is as us leaving the room and stepping back into the house.&lt;/p&gt;

&lt;p&gt;Remember that each function has it's own Execution context.&lt;/p&gt;

&lt;p&gt;Let's take a look at another example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mainBedroom&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;In the mainBedroom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;goToCloset&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;In goToCloset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;findAShirt&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;In findAShirt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;findAShirt&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;goToCloset&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;mainBedroom&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Step through the Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=function%20mainBedroom%28%29%20%7B%0A%20%20console.log%28%22In%20the%20mainBedroom%22%29%3B%0A%0A%20%20function%20goToCloset%28%29%20%7B%0A%20%20%20%20console.log%28%22In%20goToCloset%22%29%3B%0A%0A%20%20%20%20function%20findAShirt%28%29%20%7B%0A%20%20%20%20%20%20console.log%28%22In%20findAShirt%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20findAShirt%28%29%3B%0A%20%20%7D%0A%0A%20%20goToCloset%28%29%3B%0A%7D%0A%0AmainBedroom%28%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=function%20mainBedroom%20%28%29%20%7B%0A%20%20console.log%28'In%20the%20mainBedroom'%29%0A%20%20%0A%20%20function%20goToCloset%20%28%29%20%7B%0A%20%20%20%20console.log%28'In%20goToCloset'%29%0A%20%20%20%20%0A%20%20%20%20function%20findAShirt%20%28%29%20%7B%0A%20%20%20%20%20%20console.log%28'In%20findAShirt'%29%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20findAShirt%28%29%0A%20%20%7D%0A%0A%20%20goToCloset%28%29%0A%7D%0A%0AmainBedroom%28%29&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If we look at the following gif, we can see that the &lt;code&gt;mainBedroom&lt;/code&gt; function gets invoked which puts us in that room so to speak, it's Execution Context. In this function we then invoke goToCloset and step into a new room/Execution Context.&lt;/p&gt;

&lt;p&gt;We then execute &lt;code&gt;findAShirt&lt;/code&gt; which puts us in a new Execution Context and breaks our metaphor down a a bit but the concept remains. Each Execution Context has it's own variables &amp;amp; logic that gets performed inside of it. Once they are executed they are "popped off"/removed from the Execution / Call Stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F9Z4OSZE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qxx1swn9t3py96hq23xn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F9Z4OSZE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qxx1swn9t3py96hq23xn.gif" alt="'mainBedroom`, `goToCloset` &amp;amp; `findAShirt` execute sequentially and get popped off the call stack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SRboaQmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/59q3qlye3g6lnsph8uqr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRboaQmy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/59q3qlye3g6lnsph8uqr.gif" alt="'mainBedroom`, `goToCloset` &amp;amp; `findAShirt` execute sequentially and get popped off the call stack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions with Local Variables
&lt;/h2&gt;

&lt;p&gt;We mentioned earlier that our function did not take any arguments or variables. Let's change that with a new example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Elvis&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Ibarra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;kitchen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;cupOfCoffee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a hot cup of coffee&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; is in the kitchen holding &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;cupOfCoffee&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kitchen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Looking at the gifs below we can see that the variable &lt;code&gt;cupOfCoffee&lt;/code&gt; exists inside of the kitchen's Execution Context. We are also doing something a little bit different and logging the return value of the kitchen function. One way to think of this is that we are leaving the function's Execution Context with a return value and executing that value in the Global Execution Context.&lt;/p&gt;

&lt;p&gt;Now we can introduuce a new term &lt;code&gt;Scope&lt;/code&gt; which similar to Execution Context refers to where our variables are accessible.&lt;/p&gt;

&lt;p&gt;Local Scope refers to everything inside of a function (the rooms in the house) and Global Scope are variables/methods accessible in our Global Execution Context (in the house but not in the rooms).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F9sVlRzr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pf4g9em2f22hv8g0ksab.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F9sVlRzr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pf4g9em2f22hv8g0ksab.gif" alt="`cupOfCoffee` exists inside of the kitchen's Execution Context"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gmvZvIMg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vc6tvtj2n6jojvze1okx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gmvZvIMg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vc6tvtj2n6jojvze1okx.gif" alt="`cupOfCoffee` exists inside of the kitchen's Execution Context"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step through the Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=var%20firstName%20%3D%20%22Elvis%22%20%0Avar%20lastName%20%3D%20%22Ibarra%22%3B%0A%0Afunction%20kitchen%28name%29%20%7B%0A%20%20var%20cupOfCoffee%20%3D%20%22a%20hot%20cup%20of%20coffee%22%20%0A%20%20return%28name%20%2B%20%22%20is%20in%20the%20kitchen%20holding%20%22%20%2B%20cupOfCoffee%29%3B%0A%7D%0A%0Aconsole.log%28kitchen%28firstName%29%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=var%20firstName%20%3D%20%22Elvis%22%20%0Avar%20lastName%20%3D%20%22Ibarra%22%3B%0A%0Afunction%20kitchen%28name%29%20%7B%0A%20%20var%20cupOfCoffee%20%3D%20%22a%20hot%20cup%20of%20coffee%22%20%0A%20%20return%28name%20%2B%20%22%20is%20in%20the%20kitchen%20holding%20%22%20%2B%20cupOfCoffee%29%3B%0A%7D%0A%0Aconsole.log%28kitchen%28firstName%29%29%3B&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any arguments that you pass into a function will be &lt;em&gt;local variables&lt;/em&gt; in that function's Execution Context. In this example, &lt;code&gt;firstName&lt;/code&gt; &amp;amp; &lt;code&gt;lastName&lt;/code&gt; exist as a variables in the Global Execution context (where they are defined) and in the &lt;code&gt;kitchen&lt;/code&gt; Execution Context where it was passed in as an argument.&lt;/p&gt;

&lt;p&gt;Finally, our variable &lt;code&gt;cupOfCoffee&lt;/code&gt; is a local variable in the kitchen Execution Context.&lt;/p&gt;

&lt;p&gt;Let's take a look at another example. What get's logged in the example below?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;backyard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;lawnChair&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;is in the backyard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;backyard&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lawnChair&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's step through the code line by line. First, after the Global Execution Creation Step we have created a variable which stores our function &lt;code&gt;backyard&lt;/code&gt; in memory and nothing else has happened. From here we move onto line 5 which is the next line that we will execute. Our current state looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qJ11ND5e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mx02wt4i5df85lz29rf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qJ11ND5e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mx02wt4i5df85lz29rf1.png" alt="backyard defined in Global Frame"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After we execute line 5 our backyard Execution Context (local scope) undergoes a Creation phase in which the variable &lt;code&gt;lawnChair&lt;/code&gt; is initialized with a value of &lt;code&gt;undefined&lt;/code&gt;. We will define it on line 2 in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d3OV79qo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sm49sukikvfz75ocio3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d3OV79qo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sm49sukikvfz75ocio3v.png" alt="backyard local scope created with lawnChair undefined"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Line 2 executes which defines our variable &lt;code&gt;lawnChair&lt;/code&gt; with the string value &lt;code&gt;is in the backyard&lt;/code&gt;. Since we did not specify a return for this function, by default it is &lt;code&gt;undefined&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5dqPIJKn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/upaozostljccrwbq5kqn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5dqPIJKn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/upaozostljccrwbq5kqn.png" alt="`lawnChair` with the string value `is in the backyard`"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next this function will complete it's Execution Context and be popped off the Execution / Call Stack and it's variables/methods will no longer be available to the Global Execution Context (Global Frame in these images). Note the function get's removed from the Frames column. At this point we have left the backyard and stepped back into the house.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ythgVfLh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7vcpewhi2pqs8t9n0tp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ythgVfLh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7vcpewhi2pqs8t9n0tp9.png" alt="backyard removed from Execution Stack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that line 5 has finished executing we can execute the final line 7:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XJ5x2fBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hdmtf8hz2zixn42dm7u0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJ5x2fBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hdmtf8hz2zixn42dm7u0.png" alt="Reference Error: lawnChair is not defined"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An error! What's going on? In the Global Execution context we are logging the variable &lt;code&gt;lawnchair&lt;/code&gt; which is defined and exists in the &lt;code&gt;backyard&lt;/code&gt;'s Execution Context. Another way of saying this is that the &lt;code&gt;lawnchair&lt;/code&gt; is a local variable defined in the function &lt;code&gt;backyard&lt;/code&gt; which is inaccessible in the Global Scope. Or, since we stepped back into the house, we can't use the lawn chair since it's outside in the backyard.&lt;/p&gt;

&lt;p&gt;What if there's more than one local scope? Well, let's get a little tricky and put some gnomes on our lawn, what get's logged here and in what order? (Try and answer for yourself before scrolling further...)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gnome1&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Begnym&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gnome2&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jinzic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Borwass&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="nx"&gt;gnome1&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nx"&gt;gnome2&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GOi5fuay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xwpph33li0bs4arafsgb.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GOi5fuay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xwpph33li0bs4arafsgb.gif" alt="Each gnome has it's own Execution Context"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result is &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;Begnym&lt;/code&gt;, &lt;code&gt;Jinzic&lt;/code&gt;, &amp;amp; &lt;code&gt;Borwass&lt;/code&gt; in that order. This is because each gnome has it's own local scope and although the variable &lt;code&gt;name&lt;/code&gt; exists in both the local and the global scope JavaScript first looks inside the scope of the function that is currently executing.&lt;/p&gt;

&lt;p&gt;Step through the Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=function%20gnome1%20%28%29%20%7B%0A%20%20var%20name%20%3D%20%27Begnym%27%3B%0A%0A%20%20console.log%28name%29%3B%0A%7D%0A%0Afunction%20gnome2%20%28%29%20%7B%0A%20%20var%20name%20%3D%20%27Jinzic%27%3B%0A%0A%20%20console.log%28name%29%3B%0A%7D%0A%0Aconsole.log%28name%29%3B%0Avar%20name%20%3D%20%27Borwass%27%3B%0Agnome1%28%29%3B%0Agnome2%28%29%3B%0Aconsole.log%28name%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=function%20gnome1%20%28%29%20%7B%0A%20%20var%20name%20%3D%20'Begnym'%0A%0A%20%20console.log%28name%29%0A%7D%0A%0Afunction%20gnome2%20%28%29%20%7B%0A%20%20var%20name%20%3D%20'Jinzic'%0A%0A%20%20console.log%28name%29%0A%7D%0A%0Aconsole.log%28name%29%0Avar%20name%20%3D%20'Borwass'%0Agnome1%28%29%0Agnome2%28%29%0Aconsole.log%28name%29&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should be asking... well what if a variable exists in the Global scope but not in the Local scope? Well, check this out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;gnome1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Begnym&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;logName&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gnome1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;logName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Step through the Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=var%20gnome1%20%3D%20%27Begnym%27%3B%0A%0Afunction%20logName%20%28%29%20%7B%0A%20%20console.log%28gnome1%29%3B%0A%7D%0A%0AlogName%28%29%3B"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=var%20gnome1%20%3D%20'Begnym'%3B%0A%0Afunction%20logName%20%28%29%20%7B%0A%20%20console.log%28gnome1%29%3B%0A%7D%0A%0AlogName%28%29%3B&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tbv8LSeZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/71z506jj0e8aiil45lal.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tbv8LSeZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/71z506jj0e8aiil45lal.gif" alt="Logged value is Bergnym"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see if the variable does not exist in the Local scope JavaScript will look to the Global Scope  (Execution Context) and if it exists there will use that value. This is why the logged value is &lt;code&gt;Begnym&lt;/code&gt;. This process of looking in the Local scope first for a variable and then in the global scope is known as the &lt;em&gt;Scope Chain&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;For the last example I want to show what happens when a variable exists in a parent Execution Context (Scope) which as been popped off the Execution / Call Stack. For this example, let's do some laundry:&lt;/p&gt;

&lt;p&gt;Try to read the code below and guess what the final logged value will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;shirts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;fillLaundryBasket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addMore&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;grab5&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fillLaundryBasket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;shirts&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;grab5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shirts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's step through the code again but this time I'll jump to the good parts. First we'll invoke the function &lt;code&gt;fillLaundryBasket&lt;/code&gt; on line 5 with the argument &lt;code&gt;5&lt;/code&gt; and save the return value in a variable called &lt;code&gt;grab5&lt;/code&gt;. This creates the Local &lt;code&gt;fillLaundryBasket&lt;/code&gt; Execution Context with an &lt;code&gt;x&lt;/code&gt; variable with a value of &lt;code&gt;5&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pFKTD7SA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k4it2pi4xsgh53pe44m0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pFKTD7SA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k4it2pi4xsgh53pe44m0.png" alt="Local `fillLaundryBasket` Execution Context with an `x` variable with a value of `5`"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This results in the &lt;code&gt;grab5&lt;/code&gt; variable pointing to the returned &lt;code&gt;AddMore&lt;/code&gt; function with the defined &lt;code&gt;x&lt;/code&gt; variable. The &lt;code&gt;fillLaundryBasket&lt;/code&gt; Execution Context gets removed from the Execution / Call Stack but although it's variables are removed, as we'll see in the next step, nested functions have access to the parent's variables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--owuY2JNB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t3g35ev8nwwi8p0lbwrd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--owuY2JNB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t3g35ev8nwwi8p0lbwrd.png" alt="`grab5` variable pointing to the returned `AddMore` function with the defined `x` variable"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next we'll step through line 10 which adds the return value of &lt;code&gt;grab5&lt;/code&gt; with an argument of &lt;code&gt;2&lt;/code&gt;. As we can see from the screenshot the &lt;code&gt;addMore&lt;/code&gt; Execution Context still has the &lt;code&gt;x&lt;/code&gt; value of 5 although &lt;code&gt;fillLaundryBasket&lt;/code&gt; is no longer the Local scope. This is why the return and logged value is &lt;code&gt;7&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Ko2jKec--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o6txyerwfsmc0qor7k0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Ko2jKec--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o6txyerwfsmc0qor7k0k.png" alt="return and logged value is `7`"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ui.dev/javascript-visualizer/?code=var%20shirts%20%3D%200%0A%0Afunction%20fillLaundryBasket%28x%29%20%7B%0A%20%20return%20function%20addMore%20%28y%29%20%7B%0A%20%20%20%20return%20x%20%2B%20y%3B%0A%20%20%7D%3B%0A%7D%0A%0Avar%20grab5%20%3D%20fillLaundryBasket%285%29%3B%0Ashirts%20%2B%3D%20grab5%282%29%0A%0Aconsole.log%28shirts%29"&gt;UI JavaScript Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pythontutor.com/javascript.html#code=var%20shirts%20%3D%200%0A%0Afunction%20fillLaundryBasket%28x%29%20%7B%0A%20%20return%20function%20addMore%20%28y%29%20%7B%0A%20%20%20%20return%20x%20%2B%20y%3B%0A%20%20%7D%3B%0A%7D%0A%0Avar%20grab5%20%3D%20fillLaundryBasket%285%29%3B%0Ashirts%20%2B%3D%20grab5%282%29%0A%0Aconsole.log%28shirts%29&amp;amp;mode=edit&amp;amp;origin=opt-frontend.js&amp;amp;py=js&amp;amp;rawInputLstJSON=%5B%5D"&gt;JavaScript Tutor Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The scope in which the &lt;code&gt;x&lt;/code&gt; value exists has a special name known as the &lt;code&gt;Closure&lt;/code&gt; scope and is best visualized in the JavaScript Visualizer. The concept of a child "closing" the variables including the parent is called &lt;code&gt;Closures&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0kyJNpgF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0pxbs6lhw52mrqtsz436.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0kyJNpgF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0pxbs6lhw52mrqtsz436.png" alt="The scope in which the `x` value exists has a special name known as the `Closure`"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully the house metaphor helps you understand Execution Context a little bit better. The best way to learn is to walk through the code yourself and start experimenting. You can make your house/rooms as simple or complex as you want and as you get comfortable you'll find yourself building/creating your dream house (program). Have fun!&lt;/p&gt;

&lt;p&gt;That's it! Thanks again to Tyler McGinnis for the inspiration and the original material 🙏 🙂 .&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Add Tailwind CSS to your Quasar project in 5 minutes or less. </title>
      <dc:creator>Elvis Ibarra 🐃</dc:creator>
      <pubDate>Thu, 28 May 2020 15:22:26 +0000</pubDate>
      <link>https://dev.to/eltoritoelvis/add-tailwind-css-to-your-quasar-project-in-5-minutes-or-less-3n4o</link>
      <guid>https://dev.to/eltoritoelvis/add-tailwind-css-to-your-quasar-project-in-5-minutes-or-less-3n4o</guid>
      <description>&lt;h3&gt;
  
  
  Why do this?
&lt;/h3&gt;

&lt;p&gt;I've been building a passion project of mine, &lt;a href="https://jiujits.io" rel="noopener noreferrer"&gt;Jiujitsio&lt;/a&gt;, in Quasar for the past few months and wanted to implement Tailwind styling when prototyping new or creating custom components. &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 - Install Tailwind
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Install Tailwind via NPM or Yarn. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fonwx5bc2rgcggnj4jqrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fonwx5bc2rgcggnj4jqrk.png" alt="Install via npm or yarn screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 - Add Tailwind to your CSS.
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Import Tailwind Directives. Add the following in between the &lt;code&gt;style&lt;/code&gt; tags of any Quasar component you wish to style with Tailwind. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs79juh9oz1u4h82ttuoy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs79juh9oz1u4h82ttuoy.png" alt="Tailwind directives screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 - Process your CSS with Tailwind
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Since &lt;code&gt;Vue&lt;/code&gt; styles are piped through PostCSS we are going to need to modify our &lt;code&gt;.postcssrc.js&lt;/code&gt; file to require Tailwind. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjn4a49cbr5sssmy8kz9b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjn4a49cbr5sssmy8kz9b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 - Profit &amp;amp; Next Steps
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;That's it! Any Quasar components in your project where you add the Tailwind directives will now respond to Tailwind class styling. You can also optionally also add a Tailwind config file (may be a follow up post) for further customization. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Video Demo: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=c5jCzmModKo&amp;amp;feature=youtu.be" rel="noopener noreferrer"&gt;Add Tailwind CSS to your Quasar project in 5 minutes or less&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Relevant Docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/installation/" rel="noopener noreferrer"&gt;Tailwind Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quasar.dev/quasar-cli/handling-webpack" rel="noopener noreferrer"&gt;Quasar - Handling Webpack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>tailwindcss</category>
      <category>quasar</category>
      <category>css</category>
    </item>
  </channel>
</rss>
