<?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: Selen Gora</title>
    <description>The latest articles on DEV Community by Selen Gora (@selengora).</description>
    <link>https://dev.to/selengora</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%2F190297%2Fce89dff3-935a-47ae-9b1c-82fa0dd7492b.jpg</url>
      <title>DEV Community: Selen Gora</title>
      <link>https://dev.to/selengora</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/selengora"/>
    <language>en</language>
    <item>
      <title>Design Patterns in JavaScript</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Mon, 10 Feb 2020 14:06:22 +0000</pubDate>
      <link>https://dev.to/selengora/design-patterns-in-javascript-3bnk</link>
      <guid>https://dev.to/selengora/design-patterns-in-javascript-3bnk</guid>
      <description>&lt;p&gt;Just started course, Design Patterns in JavaScript on Udemy.&lt;/p&gt;

&lt;p&gt;Here is summary from first section by &lt;a href="https://github.com/nesteruk"&gt;@nesteruk&lt;/a&gt; from course.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


</description>
      <category>designpatterns</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Day 1 of #100DaysOfCode</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Thu, 02 Jan 2020 18:36:17 +0000</pubDate>
      <link>https://dev.to/selengora/day-1-of-100daysofcode-38lf</link>
      <guid>https://dev.to/selengora/day-1-of-100daysofcode-38lf</guid>
      <description>&lt;p&gt;Asynchronous and OOP JavaScript practice.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Rust or Go for web development?</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Thu, 05 Sep 2019 11:15:58 +0000</pubDate>
      <link>https://dev.to/selengora/rust-or-go-for-web-development-36gg</link>
      <guid>https://dev.to/selengora/rust-or-go-for-web-development-36gg</guid>
      <description>&lt;p&gt;Liquid error: internal&lt;/p&gt;

</description>
      <category>go</category>
      <category>rust</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Javascript hoisting note to myself</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Wed, 21 Aug 2019 22:11:11 +0000</pubDate>
      <link>https://dev.to/selengora/javascript-hoisting-note-to-myself-1aeg</link>
      <guid>https://dev.to/selengora/javascript-hoisting-note-to-myself-1aeg</guid>
      <description>&lt;p&gt;A variable can be used before it has been declared.&lt;a href="https://www.w3schools.com/js/js_hoisting.asp" rel="noopener noreferrer"&gt;*&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Assign 24 to x&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&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="c1"&gt;// 24&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Declare x&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  var, let, const Differences
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; declaration phase and initialization phase are same level. &lt;code&gt;var&lt;/code&gt; variables are hoisted.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; declaration phase after uninitialized state after comes initialization phase.&lt;/p&gt;

&lt;p&gt;Hoisting is &lt;strong&gt;not valid&lt;/strong&gt; for a &lt;code&gt;let&lt;/code&gt; variable (including for const and class). &lt;br&gt;
Before initialization, the variable is in temporal dead zone and is not accessible. &lt;a href="https://dmitripavlutin.com/variables-lifecycle-and-why-let-is-not-hoisted/" rel="noopener noreferrer"&gt;*&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Little bit deeper on &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;const&lt;/code&gt; variables, actually they are hoisting but…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It will throw an exception if you access the variable before the initialisation even if the accessing code is below the declaration (e.g. in a hoisted function declaration that is called too early).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;user Bergi has the explanation on stackoverflow&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&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%2Fassets%2Fstackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/31219420/are-variables-declared-with-let-or-const-hoisted/31222689#31222689" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Are variables declared with let or const hoisted?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jul  4 '15&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/31219420/are-variables-declared-with-let-or-const-hoisted/31222689#31222689" rel="noopener noreferrer"&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%2Fassets%2Fstackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          464
        &lt;/div&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%2Fassets%2Fstackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;@thefourtheye is correct in saying that these variables &lt;strong&gt;cannot be accessed&lt;/strong&gt; before they are declared. However, it's a bit more complicated than that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Are variables declared with &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;const&lt;/code&gt; not hoisted? What is really going on here?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;All declarations&lt;/strong&gt; (&lt;code&gt;var&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;const&lt;/code&gt;, &lt;code&gt;function&lt;/code&gt;, &lt;code&gt;function*&lt;/code&gt;…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/31219420/are-variables-declared-with-let-or-const-hoisted/31222689#31222689" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  Function hoisting?
&lt;/h2&gt;

&lt;p&gt;Function declarations are &lt;strong&gt;hoisted&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;helloFunction&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Hello hoisting&lt;/span&gt;
&lt;span class="c1"&gt;// function declaration&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;helloFunction&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello hoisting&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;Assignment functions(Function expressions) are &lt;strong&gt;not hoisted&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;myNewFunction&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//Uncaught TypeError: myNewFunction is not a function&lt;/span&gt;
&lt;span class="c1"&gt;// function expression&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myNewFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello hoisting expression&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;References: &lt;br&gt;
&lt;a href="https://www.w3schools.com/js/js_hoisting.asp" rel="noopener noreferrer"&gt;w3schools&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/getify/You-Dont-Know-JS/blob/master/up%20%26%20going/ch2.md" rel="noopener noreferrer"&gt;YDKJS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/news/what-is-variable-hoisting-differentiating-between-var-let-and-const-in-es6-f1a70bb43d" rel="noopener noreferrer"&gt;@freecodecamp&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freecodecamp.org/news/function-hoisting-hoisting-interview-questions-b6f91dbc2be8" rel="noopener noreferrer"&gt;@freecodecamp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>hoisting</category>
    </item>
    <item>
      <title>Kawaii Cat with pixel art + css</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Wed, 21 Aug 2019 12:54:47 +0000</pubDate>
      <link>https://dev.to/selengora/kawaii-cat-with-pixel-art-css-58g8</link>
      <guid>https://dev.to/selengora/kawaii-cat-with-pixel-art-css-58g8</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/SelenGora/embed/ExYKXQK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>css</category>
      <category>pixelart</category>
    </item>
    <item>
      <title>Setting the box in container to full width with CSS Grid</title>
      <dc:creator>Selen Gora</dc:creator>
      <pubDate>Wed, 21 Aug 2019 12:46:13 +0000</pubDate>
      <link>https://dev.to/selengora/setting-the-box-in-container-to-full-width-with-css-grid-1eim</link>
      <guid>https://dev.to/selengora/setting-the-box-in-container-to-full-width-with-css-grid-1eim</guid>
      <description>&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foi4es76rsjtzovk7pi03.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foi4es76rsjtzovk7pi03.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made fixed width box and full width box in grid container.&lt;br&gt;
It was new about me and wanted to share 😍&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


</description>
      <category>css</category>
      <category>layout</category>
      <category>grid</category>
    </item>
  </channel>
</rss>
