<?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: adasd</title>
    <description>The latest articles on DEV Community by adasd (@asda).</description>
    <link>https://dev.to/asda</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%2F2498716%2F72134b17-c1d0-4b2e-89a5-ff6d81cf464e.png</url>
      <title>DEV Community: adasd</title>
      <link>https://dev.to/asda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asda"/>
    <language>en</language>
    <item>
      <title>sdfs 2323122332</title>
      <dc:creator>adasd</dc:creator>
      <pubDate>Wed, 26 Feb 2025 09:20:20 +0000</pubDate>
      <link>https://dev.to/asda/sdfs-2323122332-3ef</link>
      <guid>https://dev.to/asda/sdfs-2323122332-3ef</guid>
      <description>&lt;p&gt;sdfsdfsd fsdsd 32312 23123121 123f&lt;/p&gt;

</description>
    </item>
    <item>
      <title>wqe</title>
      <dc:creator>adasd</dc:creator>
      <pubDate>Thu, 06 Feb 2025 04:21:20 +0000</pubDate>
      <link>https://dev.to/asda/wqe-13h4</link>
      <guid>https://dev.to/asda/wqe-13h4</guid>
      <description>&lt;p&gt;wqeeqw&lt;/p&gt;

</description>
      <category>weqw</category>
    </item>
    <item>
      <title>closures in js</title>
      <dc:creator>adasd</dc:creator>
      <pubDate>Mon, 03 Feb 2025 12:26:09 +0000</pubDate>
      <link>https://dev.to/asda/closures-in-js-3mi2</link>
      <guid>https://dev.to/asda/closures-in-js-3mi2</guid>
      <description>&lt;p&gt;In JavaScript, a closure is created when a function is defined inside another function, and the inner function retains access to the variables of the outer function, even after the outer function has finished executing. &lt;br&gt;
How it works:&lt;br&gt;
Lexical Scoping:&lt;br&gt;
JavaScript uses lexical scoping, which means a function's scope is determined by where it is defined in the code.&lt;br&gt;
Inner Function Access:&lt;br&gt;
An inner function has access to its own scope, the scope of its parent function, and the global scope.&lt;br&gt;
Closure Creation:&lt;br&gt;
When the outer function is called, it creates an environment that includes its variables. The inner function, when returned, retains access to this environment even after the outer function completes&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;outerFunction&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="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;innerVariable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;innerFunction&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;innerVariable&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;innerFunction&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;closure&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;outerFunction&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;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="nf"&gt;closure&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Output: 15&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
