<?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: Piyush Panchal</title>
    <description>The latest articles on DEV Community by Piyush Panchal (@programmerpiyush008).</description>
    <link>https://dev.to/programmerpiyush008</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%2F578709%2F11bafd19-2bd6-496c-b883-18a2c4e3bfe2.jpeg</url>
      <title>DEV Community: Piyush Panchal</title>
      <link>https://dev.to/programmerpiyush008</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/programmerpiyush008"/>
    <language>en</language>
    <item>
      <title>const vs. let</title>
      <dc:creator>Piyush Panchal</dc:creator>
      <pubDate>Mon, 15 Feb 2021 10:07:04 +0000</pubDate>
      <link>https://dev.to/programmerpiyush008/const-vs-let-3dfo</link>
      <guid>https://dev.to/programmerpiyush008/const-vs-let-3dfo</guid>
      <description>&lt;p&gt;In JavaScript, There are three ways of declaring a variable, why though? How are they different? &lt;code&gt;const&lt;/code&gt; cannot be redeclared. therefore it will have one constant value, and can't be changed. For Example-&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;const&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="c1"&gt;//Gives an error (const cannot be redefined.)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whereas &lt;code&gt;let&lt;/code&gt; can be changed anytime. For example-&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;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;

&lt;span class="c1"&gt;//Value changes to 5 with no errors.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading. &lt;br&gt;
Hope I helped :D&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What's the difference between map() and forEach() in JS?</title>
      <dc:creator>Piyush Panchal</dc:creator>
      <pubDate>Sat, 13 Feb 2021 16:00:03 +0000</pubDate>
      <link>https://dev.to/programmerpiyush008/what-s-the-difference-between-map-and-foreach-in-js-4lb0</link>
      <guid>https://dev.to/programmerpiyush008/what-s-the-difference-between-map-and-foreach-in-js-4lb0</guid>
      <description>&lt;p&gt;Arrays are super useful and widely used data structures. It also has a ton of different functions which can make our work so much easier. The functions that many people get confused about is &lt;code&gt;map()&lt;/code&gt; and &lt;code&gt;forEach()&lt;/code&gt; and it's reasonable both do almost the same thing. I personally made this mistake so many times when I was a beginner. The similarity is- that they both run a function or a piece of code for each of the element of the array. But &lt;code&gt;forEach()&lt;/code&gt; does not return any new array. It just runs the code for the elements. &lt;code&gt;map()&lt;/code&gt; on the other hand returns a new array with the result. Hope this helped. &lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Hi there!</title>
      <dc:creator>Piyush Panchal</dc:creator>
      <pubDate>Sat, 13 Feb 2021 15:36:56 +0000</pubDate>
      <link>https://dev.to/programmerpiyush008/hi-there-4j4g</link>
      <guid>https://dev.to/programmerpiyush008/hi-there-4j4g</guid>
      <description>&lt;p&gt;Hello! I am Piyush Panchal, I am currently a Student. I am a Web Developer, mainly focusing on JavaScript, React and NodeJS. Hope to find and write good articles!&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

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