<?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: Suprabha</title>
    <description>The latest articles on DEV Community by Suprabha (@suprabhasupi).</description>
    <link>https://dev.to/suprabhasupi</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%2F80451%2F3034728c-5307-4467-a67e-b9c00d6d33ed.png</url>
      <title>DEV Community: Suprabha</title>
      <link>https://dev.to/suprabhasupi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suprabhasupi"/>
    <language>en</language>
    <item>
      <title>Github Tips</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sat, 28 Jan 2023 20:49:48 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/github-tips-1m0b</link>
      <guid>https://dev.to/suprabhasupi/github-tips-1m0b</guid>
      <description>&lt;p&gt;&lt;span&gt;T&lt;/span&gt;his article is for beginners as well as for the experts 😉, 
as this is going to help you to avoid all the pitfalls that could lead to failure state.&lt;/p&gt;

&lt;p&gt;Here, you will learn efficient way to start the projects and push it into Github/Gitlab.&lt;/p&gt;

&lt;p&gt;Let’s see what we are going to learn in this article:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Synchronize Local with Remote &lt;/li&gt;
&lt;li&gt;Working on Branch&lt;/li&gt;
&lt;li&gt;Status of your work&lt;/li&gt;
&lt;li&gt;Land your work&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Setup Git
&lt;/h2&gt;

&lt;p&gt;Make sure to configure the &lt;strong&gt;user information&lt;/strong&gt; which will be used across all repositories.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Set the user name:&lt;br&gt;
    &lt;code&gt;$ git config --global user.username&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Set the Email Address:&lt;br&gt;
    &lt;code&gt;$ git config --global user.email&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you have done the setup, will be able to push the changes into github.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Synchronize Local with Remote
&lt;/h3&gt;

&lt;p&gt;It is important to always ensure that you have the repository on your local machine. There are two things can happen:&lt;/p&gt;

&lt;p&gt;A. &lt;strong&gt;You can create your own repository&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to the repository directory&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;project-name
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Initialize the git&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git init
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;B. &lt;strong&gt;If you are working from others repository&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To clone the repository locally.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git clone &lt;span class="o"&gt;[&lt;/span&gt;git@github.com]&lt;span class="o"&gt;(&lt;/span&gt;mailto:git@github.com&lt;span class="o"&gt;)&lt;/span&gt;:suprabhasupi/suprabha.me.git
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Yuppy! Now have cloned the repository local.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  2. Branch
&lt;/h3&gt;

&lt;p&gt;Git branches are effectively a pointer to a snapshot of your changes.&lt;br&gt;
You can create a new branch anytime when you have to work on any feature, fix, or any chore issues. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do you need to create a branch?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;You create a branch to ensure that &lt;code&gt;main&lt;/code&gt; branch should always a production ready code.&lt;br&gt;
You can create a new branch by following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git branch branch_name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The above command will create a new branch. So to confirm the branch names you can enter following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git branch

main
branch_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch from &lt;code&gt;main&lt;/code&gt; to &lt;code&gt;branch_name&lt;/code&gt;, or any other branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout branch_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to create a new branch and switch into it, you can use following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; branch_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command will create a new branch and switch to &lt;code&gt;branch_name&lt;/code&gt; branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Status
&lt;/h3&gt;

&lt;p&gt;When you want to track the work you've done, such as which files you've updated&lt;br&gt;
Here is the command to check the status of your work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Land your work
&lt;/h3&gt;

&lt;p&gt;Let’s add, commit and push your work into the remote repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;add a single file:&lt;br&gt;
    &lt;code&gt;$ git add file_name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;add all files:&lt;br&gt;
    &lt;code&gt;$ git add .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;commit your code with valid message:&lt;br&gt;
    &lt;code&gt;$ git commit -m “initial commit“&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;push your work:&lt;br&gt;
    &lt;code&gt;$ git push origin branch_name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to check your commit log:&lt;br&gt;
    &lt;code&gt;$ git log&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;merge local_branch to another_branch:&lt;br&gt;
    &lt;code&gt;$ git merge branch_name&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  Here are a few tips that can help you save time when working with Git:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Let’s say you deleted a file a month back, but one day you needed it. How can you get the latest state of the file which has been already deleted?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ans:&lt;/strong&gt; This is the command which helps you to find the commit log of that particular file:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git log &lt;span class="nt"&gt;--full-history&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;file_path&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The above command finds the commit ID that deleted the file. &lt;br&gt;
After checking the commits, and backed up one more by entering the below command:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout HEAD~1
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;This loads the file right before it was deleted 🙌&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Resolve Conflict&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s say, you took a pull from main branch and you had a conflict. &lt;br&gt;
There are few command which will help you in terms of fixing or aborting the conflict.&lt;/p&gt;

&lt;p&gt;This command will help to see a list of commits that caused conflict&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git log &lt;span class="nt"&gt;--merge&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;blockquote&gt;
&lt;p&gt;Once you fix the conflict, make sure to commit and push.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The below command helps to exit from the merge process and back to original state.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git merge &lt;span class="nt"&gt;--abort&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;How to check staged changes of any tracked files. Let’s say you have added the file and now you wanted to checkout the changes. This is the following command you can use:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git add file1.jsx
&lt;span class="nv"&gt;$ &lt;/span&gt;git diff &lt;span class="nt"&gt;--cached&lt;/span&gt; file1.jsx
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Do you know you can store temporary commits as well in local?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes, you can stash your changes and when you want those changes back you can get them back.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Check out these important commands:&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To save temporary the updated changes:&lt;br&gt;
    &lt;code&gt;$ git stash&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To check the list of stash stack:&lt;br&gt;
    &lt;code&gt;$ git stash list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Get the last stash changes from stash stack:&lt;br&gt;
    &lt;code&gt;$ git stash pop&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Delete the last stash changes from the stash stack:&lt;br&gt;
    &lt;code&gt;$ git stash drop&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks for reading the article!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aDe0OdcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4t25pJE.png" alt="Buy Me A Coffee" width="300" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;  

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>github</category>
    </item>
    <item>
      <title>Cheatsheet for Web Developers</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sun, 19 Jun 2022 12:06:04 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/cheatsheet-for-web-developers-1opg</link>
      <guid>https://dev.to/suprabhasupi/cheatsheet-for-web-developers-1opg</guid>
      <description>&lt;p&gt;If you are searching for cheatsheet, here I am sharing all the cheatsheet which will definitely going to make you life easy 😉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checkout the amazing Cheatsheet here 👇&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1️⃣ &lt;a href="https://htmlcheatsheet.com/" rel="noopener noreferrer"&gt;HTML Cheatsheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Online interactive HTML Cheat Sheet contains useful code examples and web developer tools, markup generators, and more.&lt;/p&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%2Fuploads%2Farticles%2Fcrmwl3e9oc2wvd3hx07c.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%2Fuploads%2Farticles%2Fcrmwl3e9oc2wvd3hx07c.png" alt="HTML Cheatsheet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;br&gt;
2️⃣ &lt;a href="https://cssreference.io/" rel="noopener noreferrer"&gt;CSS Reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, etc.&lt;/p&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%2Fuploads%2Farticles%2Fm5ui73sausakwcwihqzh.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%2Fuploads%2Farticles%2Fm5ui73sausakwcwihqzh.png" alt="CSS Reference"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
3️⃣ &lt;a href="https://gitsheet.wtf/" rel="noopener noreferrer"&gt;Git Sheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This cheat sheet features the most important and commonly used Git commands for easy reference. INSTALLATION &amp;amp; GUIS.&lt;/p&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%2Fuploads%2Farticles%2Foskpvc26vjxnnshozqfl.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%2Fuploads%2Farticles%2Foskpvc26vjxnnshozqfl.png" alt="Git Sheet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;br&gt;
4️⃣ &lt;a href="https://overapi.com/" rel="noopener noreferrer"&gt;OverAPI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OverAPI.com is a site collecting all the cheatsheets, all!&lt;/p&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%2Fuploads%2Farticles%2F3mpl70or3znvwa5w3aon.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%2Fuploads%2Farticles%2F3mpl70or3znvwa5w3aon.png" alt="OverAPI"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
5️⃣ &lt;a href="https://devhints.io/" rel="noopener noreferrer"&gt;Dev Hints&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a modest collection of cheat sheets for ES6, SASS, etc.&lt;/p&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%2Fuploads%2Farticles%2Fro2yoksl2ljjlfzoqtiq.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%2Fuploads%2Farticles%2Fro2yoksl2ljjlfzoqtiq.png" alt="Dev Hints"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;br&gt;
6️⃣ &lt;a href="https://cheatography.com/" rel="noopener noreferrer"&gt;Cheatography&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheatography is a collection of 5047 cheat sheets and quick references in 25 languages for everything from programming to travel!&lt;/p&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%2Fuploads%2Farticles%2Fhmsfy8prbgkcdlu44xli.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%2Fuploads%2Farticles%2Fhmsfy8prbgkcdlu44xli.png" alt="Cheatography"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;  

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Pure vs Impure Functions</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Tue, 17 May 2022 05:34:59 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/pure-vs-impure-functions-3e33</link>
      <guid>https://dev.to/suprabhasupi/pure-vs-impure-functions-3e33</guid>
      <description>&lt;p&gt;&lt;span&gt;T&lt;/span&gt;hese are the two terms that you always hear in a programming language called &lt;b&gt;Pure&lt;/b&gt; and &lt;b&gt;Impure functions&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;You know &lt;code&gt;Pure Function&lt;/code&gt; is always dependent on arguments and there should not be any side effects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What hack is Side Effects? ☠️
&lt;/h2&gt;

&lt;p&gt;When you try to use external code in the function or if you are mutating a variable then it creates a Side Effect.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example:&lt;/u&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="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;10&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&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;num&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see in the above snippet, &lt;code&gt;mul&lt;/code&gt; the function has a dependency on an outer variable called &lt;code&gt;num&lt;/code&gt;. Also, mutating &lt;code&gt;num&lt;/code&gt; value, which makes its impure function.&lt;/p&gt;

&lt;p&gt;Let’s checkout one more quick 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;function&lt;/span&gt; &lt;span class="nx"&gt;hello&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;Hello Folks!&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;So, what do you think about the above snippet? 🤔&lt;/p&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;Yeah! this is also an impure function 😵‍💫&lt;/p&gt;

&lt;p&gt;As you all know that JavaScript is synchronous, using `console` or any `callback` or `promise/fetch` will make the function asynchronous.&lt;/p&gt;

&lt;p&gt;Here using the &lt;code&gt;console&lt;/code&gt;, which is a Web API makes it an impure function.&lt;/p&gt;

&lt;p&gt;Let's checkout other side effects with &lt;b&gt;examples&lt;/b&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;DOM Manipulation, any callback or reading/writing files&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Started Multiplication&lt;/span&gt;&lt;span class="dl"&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;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&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;mul&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Updating or Modifying a global variable in pure function&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Started Multiplication&lt;/span&gt;&lt;span class="dl"&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;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;x&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;mul&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Here also, mutating outer variable which is depending on an external variable.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;x&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;mul&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's Understand the Pure and Impure function, as now you have an idea of the side effects&lt;/p&gt;

&lt;h2&gt;
  
  
  Pure Function
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It always returns the &lt;strong&gt;same result&lt;/strong&gt; if the same arguments are passed&lt;/li&gt;
&lt;li&gt;It never depends on any state/data/change during the execution of a program&lt;/li&gt;
&lt;li&gt;It always returns something&lt;/li&gt;
&lt;li&gt;Here, writing test cases will be straightforward&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Impure Function
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Changing the internal state of any argument which has been passed&lt;/li&gt;
&lt;li&gt;It may take effect without returning anything&lt;/li&gt;
&lt;li&gt;Writing test cases will be a bit complicated as there may be side effects&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pure and Impure Methods
&lt;/h3&gt;

&lt;p&gt;These are pure methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Array.map()&lt;/li&gt;
&lt;li&gt;Array.reduce()&lt;/li&gt;
&lt;li&gt;Array.filter()&lt;/li&gt;
&lt;li&gt;Array.concat()&lt;/li&gt;
&lt;li&gt;... (spread syntax, which is mostly used to create copies)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are impure methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Array.splice()&lt;/li&gt;
&lt;li&gt;Array.sort()&lt;/li&gt;
&lt;li&gt;Date.now()&lt;/li&gt;
&lt;li&gt;Math.random()&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Bonus Point 🔖
&lt;/h3&gt;

&lt;p&gt;You can clone an external state into a pure function&lt;/p&gt;

&lt;p&gt;Cloning an external state into a pure function does not make the function impure.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example:&lt;/u&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;supi&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;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newName&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;let&lt;/span&gt; &lt;span class="nx"&gt;clonedName&lt;/span&gt; &lt;span class="o"&gt;=&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="nx"&gt;clonedName&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;clonedName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;newName&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;clonedName&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;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sumi&lt;/span&gt;&lt;span class="dl"&gt;"&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="c1"&gt;// ['suprabha', 'supi', 'sumi']&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above snippet, you are using &lt;code&gt;...&lt;/code&gt; spread operator in &lt;code&gt;fullName&lt;/code&gt; the function. It will create a clone of it and then update it. So, it doesn't depend on &lt;code&gt;name&lt;/code&gt; variable.&lt;/p&gt;

&lt;p&gt;Thanks for reading the post!&lt;/p&gt;

&lt;p&gt;Hope you found this article useful. If you have any questions, feel free to drop them into the comment section or reach out to me here 👇&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt; 

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>7 Productive website for web developers</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sun, 08 May 2022 08:17:19 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/7-productive-website-for-web-developers-gn1</link>
      <guid>https://dev.to/suprabhasupi/7-productive-website-for-web-developers-gn1</guid>
      <description>&lt;p&gt;Hello devs 🙋🏻‍♀️&lt;/p&gt;

&lt;p&gt;Here, I found pretty amazing websites.&lt;br&gt;
These sites will definitely increase your productivity by 100% 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;a href="https://apption.co/"&gt;Embeddable Widget Apps for Notion&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Add 3rd party apps embed or create a custom embed for your Notion Document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ATiMe5H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1r4s3337f0tdnzo0cnp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ATiMe5H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1r4s3337f0tdnzo0cnp.png" alt="app for notion" width="880" height="454"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ &lt;a href="https://carbon.now.sh/"&gt;Carbon&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Carbon is the easiest way to create and share beautiful images of your source code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nj2ni8Cv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rshgw5uwnecdomqh8rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nj2ni8Cv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rshgw5uwnecdomqh8rc.png" alt="carbon" width="880" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  3️⃣ &lt;a href="https://smalldev.tools/"&gt;Small Dev tools&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;FREE tools for developers like encoder/decoder, HTML/CSS/Javascript formatters, minifiers, fake or test data generators &amp;amp; much more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1YytGuvT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwftsp591av3tlnqyzd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1YytGuvT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwftsp591av3tlnqyzd6.png" alt="small dev tools" width="880" height="406"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  4️⃣ &lt;a href="https://www.remove.bg/"&gt;Remove Background from Image&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Remove backgrounds 100% automatically in 5 seconds with zero clicks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z6zsyYW9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4kq0kmprtgvt18jlp19.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z6zsyYW9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4kq0kmprtgvt18jlp19.png" alt="remove background from image" width="880" height="488"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  5️⃣ &lt;a href="https://metatags.io/"&gt;Metatags&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Meta tags are specific snippets of text and image content that provide a summary for a webpage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kqTkONUI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wojpiq6rs2jm1ei861c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kqTkONUI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wojpiq6rs2jm1ei861c.png" alt="matatags" width="880" height="366"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  6️⃣ &lt;a href="//readme.so"&gt;ReadMe&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The easiest way to create a README file in minutes visually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KYEcf_GS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9zcfk07rcetlodo9ovrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KYEcf_GS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9zcfk07rcetlodo9ovrc.png" alt="readme" width="880" height="419"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  7️⃣ &lt;a href="//storytale.io"&gt;Storytale&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It provides illustrations from the best creators worldwide to designers with limits in time and asset skills. Boost your projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PpQG1IPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mts7hdq8zhpzp1750sq2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PpQG1IPG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mts7hdq8zhpzp1750sq2.png" alt="storytale" width="880" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading this post!&lt;br&gt;
Hope you found few sites useful here ☺️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aDe0OdcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4t25pJE.png" alt="Buy Me A Coffee" width="300" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt; 

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Understand HTTP CORS Request</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Tue, 26 Apr 2022 15:21:50 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/understand-http-cors-request-1j9j</link>
      <guid>https://dev.to/suprabhasupi/understand-http-cors-request-1j9j</guid>
      <description>&lt;p&gt;&lt;span&gt;Y&lt;/span&gt;ou always used HTTP methods like GET/POST/PUT/DELETE, there is one more methods called OPTIONS which used to execute prior to GET/POST/PUT/DELETE methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CORS 🤔
&lt;/h2&gt;

&lt;p&gt;Cross-Origin Resource Sharing (CORS) is an HTTP-header-based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Preflight request in CORS? 🤨
&lt;/h2&gt;

&lt;p&gt;According to &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request" rel="noopener noreferrer"&gt;MDN Docs&lt;/a&gt;, A CORS preflight request is a CORS request that checks to see if the CORS protocol is understood and a server is aware using specific methods and headers.&lt;/p&gt;

&lt;p&gt;It is an &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS&amp;lt;br&amp;gt;%0A" rel="noopener noreferrer"&gt;OPTIONS&lt;/a&gt; request, using three HTTP request headers: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method" rel="noopener noreferrer"&gt;Access-Control-Request-Method&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers" rel="noopener noreferrer"&gt;Access-Control-Request-Headers"&lt;/a&gt; , and the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin" rel="noopener noreferrer"&gt;Origin&lt;/a&gt; header.&lt;/p&gt;

&lt;p&gt;The preflight request is automatically issued by the browser and frontend devs don’t do the options call.&lt;/p&gt;

&lt;p&gt;OPTIONS call appears when the request is qualified as "to be preflighted".&lt;/p&gt;

&lt;h3&gt;
  
  
  How does the Preflight request work?
&lt;/h3&gt;

&lt;p&gt;Before sending a POST request to the server, you will ask the server for a POST request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;OPTIONS&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;foo&lt;/span&gt;
&lt;span class="nx"&gt;Access&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Control&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;POST&lt;/span&gt;
&lt;span class="nx"&gt;Access&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Control&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;,&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;requested&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;with&lt;/span&gt;
&lt;span class="nx"&gt;Origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//foo.bar.org&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the server allows it, then it will respond to the preflight request with an &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods" rel="noopener noreferrer"&gt;OPTIONS&lt;/a&gt; response header, which lists &lt;code&gt;POST&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;1.1&lt;/span&gt; &lt;span class="mi"&gt;204&lt;/span&gt; &lt;span class="nx"&gt;No&lt;/span&gt; &lt;span class="nx"&gt;Content&lt;/span&gt;
&lt;span class="nx"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;keep&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;alive&lt;/span&gt;
&lt;span class="nx"&gt;Access&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Control&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Allow&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//foo.bar.org&lt;/span&gt;
&lt;span class="nx"&gt;Access&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Control&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Allow&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OPTIONS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;DELETE&lt;/span&gt;
&lt;span class="nx"&gt;Access&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Control&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Max&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;86400&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lets take an example, you are working on a blog website &lt;a href="http://blog.suprabha.me" rel="noopener noreferrer"&gt;blog.suprabha.me&lt;/a&gt; and your API is on &lt;strong&gt;api.blog.suprabha.me&lt;/strong&gt;. It’s really nice and easy to understand to see the prefix of the blog website is “API”.&lt;/p&gt;

&lt;p&gt;As you can see the the API(&lt;strong&gt;api.blog.suprabha.me&lt;/strong&gt;) and the origin( &lt;a href="http://blog.suprabha.me" rel="noopener noreferrer"&gt;blog.suprabha.me&lt;/a&gt;) are different, also the hostname is different. &lt;/p&gt;



&lt;p&gt;Port and Protocol also follow the same logic as hostname. So if there is any differences in hostname, port, protocol request executed on the page will require a CORS request.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
If you notice the header &lt;code&gt;sec-fetch-site&lt;/code&gt; is attached to any XHR request in the firefox/chrome browser it will indicate whether this was a same-origin request or not.&lt;/p&gt;

&lt;p&gt;A quick example of cross-origin request headers:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sec-Fetch-Site: cross-site&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;cross-site tells the request initiator and the server hosting the resource have a different site.&lt;/p&gt;

&lt;p&gt;If you try to write a proxy using node or use any services like Cloudflare to proxy your application, which creates an alias to the API which routes &lt;strong&gt;api.blog.suprabha.me&lt;/strong&gt; to &lt;strong&gt;blog.suprabha.me/api&lt;/strong&gt; and moving over the JavaScript clients using the &lt;code&gt;API.&lt;/code&gt; subdomain will cut your network traffic in half.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reference 🧐
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Site" rel="noopener noreferrer"&gt;Sec-Fetch-Site&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>11 Productive Websites for Web Developers</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sat, 23 Apr 2022 11:12:12 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/11-productive-websites-for-web-developers-2f1</link>
      <guid>https://dev.to/suprabhasupi/11-productive-websites-for-web-developers-2f1</guid>
      <description>&lt;p&gt;Found amazing resources which will save you tons of time as a web developer and increase your productivity👇&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;&lt;a href="https://unminify.com/" rel="noopener noreferrer"&gt;Unminify&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This tool will &lt;strong&gt;&lt;em&gt;unminify&lt;/em&gt;&lt;/strong&gt;, reformat, and reindent ugly JavaScript, CSS, HTML, XML, and JSON code, making it readable again.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650710971672%2FSJbe8zqcL.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650710971672%2FSJbe8zqcL.png" alt="Screenshot 2022-04-23 at 4.17.42 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;&lt;a href="https://favicon.io/" rel="noopener noreferrer"&gt;Favicon.io&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It quickly generates your &lt;strong&gt;&lt;em&gt;favicon&lt;/em&gt;&lt;/strong&gt; from text, image, or choose from hundreds of emojis.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650710999674%2FmBLYRGFlu.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650710999674%2FmBLYRGFlu.png" alt="Screenshot 2022-04-23 at 4.18.11 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;&lt;a href="https://box-shadow.dev/" rel="noopener noreferrer"&gt;Box-shadow&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Box Shadows&lt;/em&gt;&lt;/strong&gt;. Show code. Customize Shadows. Add a shadow&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711063463%2F5iiTPHVs5.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711063463%2F5iiTPHVs5.png" alt="Screenshot 2022-04-23 at 4.20.35 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;&lt;a href="https://metatags.io/" rel="noopener noreferrer"&gt;Metatags.io&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Meta tags&lt;/em&gt;&lt;/strong&gt; are specific snippets of text and image content that provide a summary for a webpage. Often meta-tag data shows up whenever someone shares a link on Facebook, Twitter, or other social media.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711076545%2FXcP8JOzGo.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711076545%2FXcP8JOzGo.png" alt="Screenshot 2022-04-23 at 4.20.41 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;&lt;a href="https://www.remove.bg/" rel="noopener noreferrer"&gt;Remove.bg&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove&lt;/em&gt;&lt;/strong&gt; image backgrounds automatically in 5 seconds with just one click.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711091071%2FhrFWqU9-p.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711091071%2FhrFWqU9-p.png" alt="Screenshot 2022-04-23 at 4.20.48 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. &lt;strong&gt;&lt;a href="https://poet.so/" rel="noopener noreferrer"&gt;Poet.so&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Capture and share Twitter posts as beautiful images.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711179636%2FlEYd0z1FO.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711179636%2FlEYd0z1FO.png" alt="Screenshot 2022-04-23 at 4.22.07 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;&lt;a href="https://carbon.now.sh/" rel="noopener noreferrer"&gt;Carbon&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Carbon&lt;/em&gt;&lt;/strong&gt; is the easiest way to create and share beautiful images of your source code.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711261313%2FoZaKPh7Xg.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711261313%2FoZaKPh7Xg.png" alt="Screenshot 2022-04-23 at 4.22.40 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8. &lt;strong&gt;&lt;a href="https://neumorphism.io/#e0e0e0" rel="noopener noreferrer"&gt;Neumorphism&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;CSS code generator that will help with colors, gradients, and shadows to adopt this new design trend or discover its possibilities.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711276904%2F02P6CBnws.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711276904%2F02P6CBnws.png" alt="Screenshot 2022-04-23 at 4.22.45 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9. &lt;strong&gt;&lt;a href="https://picsum.photos/" rel="noopener noreferrer"&gt;Lorem Picsum&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Lorem Ipsum for photos. &lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711301561%2FgeL5LDXWX.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711301561%2FgeL5LDXWX.png" alt="Screenshot 2022-04-23 at 4.22.49 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;strong&gt;&lt;a href="https://compressor.io/" rel="noopener noreferrer"&gt;Compressor.io&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Achieve huge compressions while keeping the quality of the picture intact&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711316758%2FWPoU-wZds.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711316758%2FWPoU-wZds.png" alt="Screenshot 2022-04-23 at 4.24.44 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  11. &lt;strong&gt;&lt;a href="https://pfpmaker.com/" rel="noopener noreferrer"&gt;PFPmaker&lt;/a&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Create professional profile pics from any photo.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711330460%2FV5sUYn4So.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1650711330460%2FV5sUYn4So.png" alt="Screenshot 2022-04-23 at 4.24.49 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope, you will find the article useful and boost your productivity with these resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting started with Web 3.0 for Frontend Engineer</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sat, 02 Apr 2022 08:11:43 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/getting-started-with-web-30-for-frontend-engineer-3iaj</link>
      <guid>https://dev.to/suprabhasupi/getting-started-with-web-30-for-frontend-engineer-3iaj</guid>
      <description>&lt;p&gt;&lt;span&gt;E&lt;/span&gt;very new advent of the web is at first baffling(impossible to understand).

Web 3.0 is the third generation of internet services for websites and applications that will focus on using a machine-based understanding of data to provide a data-driven and Semantic Web. &lt;/p&gt;

&lt;h3&gt;
  
  
  Web 1️⃣.0️⃣
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Web 1.0 is a read-only web 📖&lt;/li&gt;
&lt;li&gt;In period: 1989 to 2005&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Web 2️⃣.0️⃣
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Web 2.0 is a read-write web 📝&lt;/li&gt;
&lt;li&gt;~2005 - Present&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: Airbnb, Facebook, Twitter, Instagram, Youtube, WhatsApp&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📝 Websites were like user-created content uploaded to social-networking services *&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Web 3️⃣.0️⃣
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Web 3.0 is a read-write-interact web (powered by artificial intelligence) 🌏&lt;/li&gt;
&lt;li&gt;Decentralized apps that run on the blockchain&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apps which doesn’t use user personal information to earn money&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📝 Web 3.0 is not new, Jeffrey Zeldman, one of the early developers of Web 1.0 and 2.0 applications, had written a blog post putting his support behind Web 3.0 back in 2006 *&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's checkout in movie terms 😉&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1648885823181%2FvjOeoAxMr.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1648885823181%2FvjOeoAxMr.png" alt="1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Capability of Web 2.0 and Web 3.0 🔥
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Web 2.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Any Social post can be deleted by the platform&lt;/li&gt;
&lt;li&gt;Server can go down for any service&lt;/li&gt;
&lt;li&gt;Payments service may decide to not allow payment for some work&lt;/li&gt;
&lt;li&gt;Computers use the HTTP protocol in the form of unique web addresses to find information, which is stored at a fixed location generally on a single server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Web 3.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It's not possible for the platform to delete your post&lt;/li&gt;
&lt;li&gt;Server can’t go down &lt;/li&gt;
&lt;li&gt;Can’t prevent the payment&lt;/li&gt;
&lt;li&gt;As information would be found based on its content, it could be stored in multiple locations simultaneously and hence be decentralized&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features of Web 3.0 🎖️
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open:&lt;/strong&gt; It’s open in the sense that it’s made with open-source software&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trustless:&lt;/strong&gt; The network will allow participants to interact directly without going through a trusted intermediary&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permissionless:&lt;/strong&gt; Including users and providers, can engage without the need for permission from a controlling organization.&lt;/li&gt;
&lt;li&gt;Self-governing&lt;/li&gt;
&lt;li&gt;Distributed and robust&lt;/li&gt;
&lt;li&gt;Native built-in payments&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Payment 💰
&lt;/h2&gt;

&lt;p&gt;Let's talk about 2 payments modules:&lt;/p&gt;

&lt;p&gt;a. Web Payment&lt;/p&gt;

&lt;p&gt;b. Native Payment&lt;/p&gt;

&lt;h3&gt;
  
  
  a. Web Payment
&lt;/h3&gt;

&lt;p&gt;Companies like Stripe and Paypal have created billions of dollars of value by enabling electronic payments.&lt;/p&gt;

&lt;h3&gt;
  
  
  b. Native Payment
&lt;/h3&gt;

&lt;p&gt;It has been built upon the root level. &lt;br&gt;
Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secure&lt;/li&gt;
&lt;li&gt;Easy&lt;/li&gt;
&lt;li&gt;Anonymous&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The best Crypto wallets for native payments are MetaMask and Torus&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://blog.suprabha.me/76-centralization-vs-decentralization" rel="noopener noreferrer"&gt;Decentralization&lt;/a&gt; is a core tenet of Web 3.0
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Examples of Web 3.0 Applications 🌐
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Siri&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With Siri, we have Samsung Bixby, amazon’s Alexa, which is able to understand my question like where is the nearest park and gives the correct answer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Wolfram Alpha&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It’s a computational intelligence platform that now uses web3.)is a “computational knowledge engine” that answers your questions directly by computation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Steemit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A great example of web 3.0 social network websites.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sola&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Steemit is a great example of a web 3.0 social network website. It is a decentralized reward platform that runs entirely on the Steem Blockchain social media model. It rewards content creators or bloggers with cryptocurrencies for contributing content on the site.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;IDEX&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As IDEX is an Ethereum-based exchange, the user would need an Ethereum wallet to trade on the platform.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;e-Chat&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://echat.one/" rel="noopener noreferrer"&gt;e-Chat&lt;/a&gt; is a web 3.0 app that is powered by a decentralized blockchain. it is widely used to send cryptocurrency. App Store and Play Market have an e-Chat app for their users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LBRY&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lbry.com/" rel="noopener noreferrer"&gt;LBRY&lt;/a&gt; is a web 3.0 video and music website with a library of different forms of content, such as books, music, and videos.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ethlance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ethlance.com/" rel="noopener noreferrer"&gt;Ethlance&lt;/a&gt; is a web 3.0 remote job platform. The decentralized app works on top of the Ethereum blockchain, where anyone can hire and start working in exchange for Ether cryptocurrency, which was never possible with older technology.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Semantic Web 🌐
&lt;/h3&gt;

&lt;p&gt;The goal is to make internet data machine-readable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Web 3.0 ❗= Semantic Web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web 3.0 uses technologies based on Semantic web concepts and natural language processing to make user interaction more intuitive, it also has other features such as widespread use of AI and machine learning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the evolution of the Semantic Web computers will be able to understand internet data directly. The idea behind using the semantic web is that it understands and &lt;a href="https://www.singlegrain.com/seo/how-to-understand-searcher-intent-and-use-it-to-boost-seo-rankings/" rel="noopener noreferrer"&gt;interprets the context&lt;/a&gt; and concept of the data. Therefore, when a user searches for an answer, web 3.0 delivers the most accurate and relevant result to the end user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The goal of the Semantic Web is to make internet data machine-readable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How Identity Works in Web 3.0 🤔
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Identities will be tied to the wallet address of the user interacting with the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wallet addresses are completely anonymous unless the user decides to tie their own identity to it publicly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User can choose the same wallet across multiple Dapps(Decentralized Applications).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pros 👍
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Efficiency in search results&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Big companies also will no longer have control over data, services, or sites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sharing information will be easier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Restrictionless Platform:&lt;/strong&gt; it is easier for users to transfer their assets or wealth anywhere across the world in no time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Single Profile Creation:&lt;/strong&gt; With web 3.0, users do not need to create individual personal profiles for different platforms. A single profile will work on any platform, and the user will have complete ownership of any given information.&lt;/p&gt;

&lt;p&gt;👉 Without users’ permission, no corporation can access their data or verify its accuracy. However, users have the choice to share their profiles and sell their data to advertisers or brands.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connectivity:&lt;/strong&gt; Web 3.0 will provide the same content across multiple applications and services will be available on different devices accessible from anywhere.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons 👎
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Transactions are slower on web3 because they're decentralized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web 3.0 will be complicated for newcomers to grasp the concept.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only advanced devices will be able to handle Web 3.0 locking out the population that can’t afford such devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UX- interacting with web3 applications can require extra steps, software, and education.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;most successful Dapps put very small portions of their code on the blockchain as it's expensive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;People will spend too much time on the internet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Roadmap of Web 3.0 🛣
&lt;/h3&gt;

&lt;p&gt;If you are really interested in learning Web 3.0, then here is a quick roadmap&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1648885992749%2FnOD3lxQbu.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1648885992749%2FnOD3lxQbu.png" alt="2.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Reference 🧐
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web3.foundation/" rel="noopener noreferrer"&gt;https://web3.foundation/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.useweb3.xyz/" rel="noopener noreferrer"&gt;https://www.useweb3.xyz/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://coinmarketcap.com/alexandria/article" rel="noopener noreferrer"&gt;https://coinmarketcap.com/alexandria/article&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Summary ⅀
&lt;/h3&gt;

&lt;p&gt;Web 3.0 represents the next iteration or phase of the evolution of the web/Internet and potentially could be as disruptive and represent as big a paradigm shift as Web 2.0 did. Web 3.0 is built upon the core concepts of decentralization, openness, and greater user utility.&lt;/p&gt;

&lt;p&gt;Understood the web 3 applications and their features.&lt;/p&gt;

&lt;p&gt;Next Section, we will look into MetaVerse and NFT 😍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>web3</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Centralization vs Decentralization</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Thu, 24 Mar 2022 16:19:28 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/centralization-vs-decentralization-36k5</link>
      <guid>https://dev.to/suprabhasupi/centralization-vs-decentralization-36k5</guid>
      <description>&lt;p&gt;You have heard about &lt;strong&gt;decentralization&lt;/strong&gt; a lot in Web 3.0 topic. Let's understand centralization and decentralization in deep 👇&lt;/p&gt;

&lt;h3&gt;
  
  
  Decentralization is a core tenet of Web 3.0
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Centralization
&lt;/h2&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%2Fuploads%2Farticles%2F1of80xf6c5m0unj2ocdc.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%2Fuploads%2Farticles%2F1of80xf6c5m0unj2ocdc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Centralization is a form of organizational structure where the decision making capability rests with the top management&lt;/p&gt;

&lt;h3&gt;
  
  
  Useful:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Higher performance and easier to implement&lt;/li&gt;
&lt;li&gt;Single point of failure: malicious actors may be able to take down the network by targeting the central authority.&lt;/li&gt;
&lt;li&gt;Participation in the network is controlled by the central authority.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Decentralization
&lt;/h2&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%2Fuploads%2Farticles%2F1o1g6r3rci5qtnnu4rql.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%2Fuploads%2Farticles%2F1o1g6r3rci5qtnnu4rql.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Decentralization is another form of organizational structure that functions by delegating decision-making capabilities to multiple teams across geographies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Useful:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Lower performance and more complex to implement&lt;/li&gt;
&lt;li&gt;No single point of failure: network can still function even if a large proportion of participants are attacked/taken out.&lt;/li&gt;
&lt;li&gt;Anyone can participate in the network; there are no “gatekeepers.” Ideally, the cost of participation is very low.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>web3</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Amazing Resources for Web Developers</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Fri, 18 Mar 2022 14:41:38 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/amazing-resources-for-web-developers-ma9</link>
      <guid>https://dev.to/suprabhasupi/amazing-resources-for-web-developers-ma9</guid>
      <description>&lt;p&gt;Found amazing resources which will save you tons of time as a web developer👇&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;a href="https://10015.io/" rel="noopener noreferrer"&gt;10015 Tools&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It includes text tools, image tools, CSS tools, coding tools (e.g. minifiers), color tools, social media tools, and a few others under a miscellaneous category.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612683917%2Fw_N0Pm_vT.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612683917%2Fw_N0Pm_vT.png" alt="Screenshot 2022-03-18 at 7.40.31 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;a href="https://colorpalettes.earth/" rel="noopener noreferrer"&gt;Color palettes&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This tool displays color palettes sourced from images of nature&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612786152%2FYzm-0ERRt.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612786152%2FYzm-0ERRt.png" alt="Screenshot 2022-03-18 at 7.42.54 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;a href="https://unicodearrows.com/" rel="noopener noreferrer"&gt;Unicode Arrows&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Unicode Arrows a one-stop location to copy and paste&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612833916%2FOYAz_Lvdt.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612833916%2FOYAz_Lvdt.png" alt="Screenshot 2022-03-18 at 7.43.44 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;a href="https://iconduck.com/" rel="noopener noreferrer"&gt;Iconduck&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This has 100,000 icons that are searchable by keyword.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612872650%2F7SvlZpBN2.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612872650%2F7SvlZpBN2.png" alt="Screenshot 2022-03-18 at 7.44.21 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;a href="https://ui.glass/generator/" rel="noopener noreferrer"&gt;Glassmorphism CSS Generator&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This is an online generator that lets you build a “glassmorphism” effect on a page element.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612912898%2FY3aEuMvj-.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647612912898%2FY3aEuMvj-.png" alt="Screenshot 2022-03-18 at 7.45.03 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. &lt;a href="https://skuawk.com/" rel="noopener noreferrer"&gt;Skuawk&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It's an alternative to Unsplash, for stock images 😉&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613067105%2Fw88DqtQe3.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613067105%2Fw88DqtQe3.png" alt="Screenshot 2022-03-18 at 7.47.27 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;a href="https://doodad.dev/pattern-generator/" rel="noopener noreferrer"&gt;Doodad Pattern Generator&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This interactive tool allows you to build your own patterned backgrounds that you can export in a variety of formats.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613180596%2FdkDQXhSNE.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613180596%2FdkDQXhSNE.png" alt="Screenshot 2022-03-18 at 7.48.19 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8. &lt;a href="https://markodenic.com/tools/buttons-generator/" rel="noopener noreferrer"&gt;Buttons Generator&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;This is a gallery of buttons built with HTML and CSS.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613189590%2FhwNrBhggm.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613189590%2FhwNrBhggm.png" alt="Screenshot 2022-03-18 at 7.49.16 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9. &lt;a href="https://neumorphism.io/#e0e0e0" rel="noopener noreferrer"&gt;Neumorphism Generator&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Generate your own neumorphism&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613277621%2FqyU7AjQe1.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613277621%2FqyU7AjQe1.png" alt="Screenshot 2022-03-18 at 7.50.35 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;a href="https://www.svgrepo.com/" rel="noopener noreferrer"&gt;SVG Repo&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It’s a repository of more than 300,000 free, optimized, SVG-based graphics and icons&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613286366%2FYrXPcmVbU.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613286366%2FYrXPcmVbU.png" alt="Screenshot 2022-03-18 at 7.51.02 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  11. &lt;a href="https://maplibre.org/" rel="noopener noreferrer"&gt;MapLibre&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Mapping library which includes JavaScript library as well as an SDK for displaying maps inside of iOS and Android apps.&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613377853%2F6kLqbSXpX.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613377853%2F6kLqbSXpX.png" alt="Screenshot 2022-03-18 at 7.51.54 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  12. &lt;a href="https://baseline.is/tools/background-remover/" rel="noopener noreferrer"&gt;Baseline Background Remover&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;AI-based background remover tools have been a dime-a-dozen recently.&lt;br&gt;
Yeah, It's free as of now!&lt;/p&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613387128%2FUbJn64abK.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1647613387128%2FUbJn64abK.png" alt="Screenshot 2022-03-18 at 7.52.37 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of the above sites are free to make your life easier by using the above tools 😉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>JavaScript Proxy</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Wed, 16 Mar 2022 09:48:55 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/javascript-proxy-1bmb</link>
      <guid>https://dev.to/suprabhasupi/javascript-proxy-1bmb</guid>
      <description>&lt;p&gt;&lt;span&gt;A&lt;/span&gt; JavaScript Proxy is an object that wraps another object and intercepts the fundamental operations of the target object.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;syntax:&lt;/u&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;proxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;target&lt;/code&gt; – is an object to wrap, can be anything, including functions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;handler&lt;/code&gt; – proxy configuration: an object with “traps”, methods that intercept operations. – e.g. &lt;code&gt;get&lt;/code&gt; trap for reading a property of &lt;code&gt;target&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt; trap for writing a property into &lt;code&gt;target&lt;/code&gt;, and so on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's look a quick example by defining an object called user:&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;supi&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;// defining a handler function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="c1"&gt;// now, create a proxy&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;userProxy&lt;/code&gt; object uses the &lt;code&gt;user&lt;/code&gt; object to store data. The &lt;code&gt;userProxy&lt;/code&gt; can access all properties of the &lt;code&gt;user&lt;/code&gt; object.&lt;/p&gt;

&lt;p&gt;Let’s see the output:&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;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;userProxy&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;span class="c1"&gt;// suprabha&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;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// supi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you modify the original object &lt;code&gt;user&lt;/code&gt;, the change is reflected in the &lt;code&gt;userProxy&lt;/code&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;user&lt;/span&gt;&lt;span class="p"&gt;.&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="s1"&gt;sam&lt;/span&gt;&lt;span class="dl"&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;userProxy&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;span class="c1"&gt;// sam&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, a change in the &lt;code&gt;userProxy&lt;/code&gt; object will be reflected in the original object &lt;code&gt;user&lt;/code&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;proxyUser&lt;/span&gt;&lt;span class="p"&gt;.&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="s1"&gt;s&lt;/span&gt;&lt;span class="dl"&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;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are methods in proxy, here we will cover most important &lt;strong&gt;methods&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;get&lt;/li&gt;
&lt;li&gt;set&lt;/li&gt;
&lt;li&gt;apply&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1️⃣ get:
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;handler.get()&lt;/code&gt;&lt;/strong&gt; method is a trap for getting a property value.&lt;/p&gt;

&lt;p&gt;Also you can make the changes using &lt;code&gt;get&lt;/code&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;supi&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;// defining a handler function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;receiver&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sumi&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="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// now, create a proxy&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&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;userProxy&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;span class="c1"&gt;// sumi&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;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// sumi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As of now we don’t have &lt;code&gt;fullUserName&lt;/code&gt; in user object, so let’s create it in proxy using &lt;code&gt;get&lt;/code&gt; trap:&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;supi&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;property&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;property&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fullUserName&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt;
            &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;target&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;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;property&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;const&lt;/span&gt; &lt;span class="nx"&gt;userProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&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;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fullUserName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// suprabha supi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2️⃣ set:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;set&lt;/code&gt; trap controls behaviour when a property of the &lt;code&gt;target&lt;/code&gt; object is set.&lt;/p&gt;

&lt;p&gt;So, let’s say you have to add some condition, so you can do it in &lt;code&gt;set&lt;/code&gt; trap.&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;supi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;age&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;number&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="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Age should be in number!&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The user must be 18 or older!&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="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&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;const&lt;/span&gt; &lt;span class="nx"&gt;userProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// if you try to set age to bool, you will get error&lt;/span&gt;
&lt;span class="nx"&gt;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Error: Age must be a number.&lt;/span&gt;

&lt;span class="nx"&gt;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;16&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// The user must be 18 or older.&lt;/span&gt;

&lt;span class="nx"&gt;userProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;20&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="c1"&gt;// no errors would be found&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3️⃣ apply
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;handler.apply()&lt;/code&gt; method is a trap for a function call. Here is the syntax:&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;proxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;apply&lt;/span&gt;&lt;span class="p"&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;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;thisArg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&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;Now, lets follow the above example by captialzing the first and last name.&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;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;suprabha&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;supi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getFullName&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;user&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="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;user&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;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;const&lt;/span&gt; &lt;span class="nx"&gt;getFullNameProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;getFullName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;thisArg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&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;target&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&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="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;getFullNameProxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// SUPRABHA SUPI&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reference 🧐
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy"&gt;Proxy MDN&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aDe0OdcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4t25pJE.png" alt="Buy Me A Coffee" width="300" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Git Reflog</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Sat, 05 Mar 2022 11:51:02 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/git-reflog-4gd9</link>
      <guid>https://dev.to/suprabhasupi/git-reflog-4gd9</guid>
      <description>&lt;p&gt;&lt;span&gt;B&lt;/span&gt;y the name &lt;b&gt;git reflog&lt;/b&gt; - Manages reflog information. It keeps tracks of everything which you do locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s understand the git reflog and git log 👀
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;git reflog&lt;/code&gt; keep tracks of everything you have done locally.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;example: &lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep track of commit history,&lt;/li&gt;
&lt;li&gt;if you have done hard reset,&lt;/li&gt;
&lt;li&gt;it keeps track of git commit --amend as well&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For &lt;code&gt;git log&lt;/code&gt;, it never track the above commits(like reset and --amend).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;git reflog&lt;/code&gt; shows all your trials and errors. The &lt;code&gt;git log&lt;/code&gt; just shows a clean and polished version of your work history.&lt;/p&gt;

&lt;p&gt;So let’s say you have amend the commit, hence there will be new commit. If you do a reset and skip back a few commits in your history, those commits you skipped over won't show up in the log.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is more to talk, let’s discuss it 😅&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While working on repo, and habits of pushing code into &lt;code&gt;main&lt;/code&gt; branch 😅&lt;/p&gt;

&lt;p&gt;I started working on one feature without taking pull from &lt;code&gt;main&lt;/code&gt; branch, after making changes when I tried to push changes to the &lt;code&gt;main&lt;/code&gt; branch. I got following errors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git push origin main
// I got to know I had to take pull from main &lt;span class="o"&gt;(&lt;/span&gt;which some how I missed&lt;span class="o"&gt;)&lt;/span&gt;
// and without taking pull I pushed forcefully
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then I did the unthinkable 😂&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git push origin main &lt;span class="nt"&gt;-f&lt;/span&gt;
// successfully pushed to main branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Later one of my colleague took pull from the main branch, and she was 😳😳🤯🤯. &lt;/p&gt;

&lt;p&gt;Then I got to know that by force pushing my changes, I have removed her commit form the remote branch and the icing on the cake was that she has pulled the changes and now her work vanished from her local machine too! 🙈&lt;/p&gt;

&lt;p&gt;We were not able to see those commits using &lt;code&gt;git log&lt;/code&gt;(almost 5-6 commit ID’s were missing) 😥&lt;/p&gt;

&lt;p&gt;To revert back my commit, I had to find the last commit ID which has been removed from commit history. If I would have not closed my &lt;strong&gt;terminal tab&lt;/strong&gt;, then there was a chance to get the last commit ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How would not closing terminal tab have been helpful 🤔&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, while doing forcefully push, you get the message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;+ aauuii1...789011 HEAD -&amp;gt; branchname &lt;span class="o"&gt;(&lt;/span&gt;forced update&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;aauuii1&lt;/code&gt;  is previous HEAD, and &lt;code&gt;789011&lt;/code&gt; is new which just pushed forcefully.&lt;br&gt;
So you can easily revert to that commit ID 🙌🏻&lt;/p&gt;

&lt;p&gt;But seems, I am not that lucky, as I already closed my terminal tabs 🤦‍♀️  &lt;/p&gt;

&lt;p&gt;After 🔍 , I got to know the context about &lt;code&gt;git log&lt;/code&gt; and &lt;code&gt;git reflog&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;git reflog&lt;/code&gt; tells you the chronological history of what you did.&lt;/p&gt;

&lt;p&gt;Their I found this 👇 command,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git reflog show remotes/origin/branchname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It shows the forced update (&lt;code&gt;789011&lt;/code&gt;) and previous commit (&lt;code&gt;aauuii1&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;After getting the last commit ID, I created new branch and reset to the commit ID&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; branch_name
&lt;span class="nv"&gt;$ &lt;/span&gt;git reset &lt;span class="nt"&gt;--soft&lt;/span&gt; aauuii1

// yayy! Its &lt;span class="k"&gt;done&lt;/span&gt; 😍
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;git reflog&lt;/code&gt; allows you to go back and find those commits as it'll give you the commit ids. It is really a life saver 🥁&lt;/p&gt;

&lt;h3&gt;
  
  
  Moral of the story 🥇
&lt;/h3&gt;

&lt;p&gt;Never give up, with little patience and some googling skill you might end up saving hours of work 💛&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aDe0OdcG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/4t25pJE.png" alt="Buy Me A Coffee" width="300" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Stop using Array.map() everywhere 🥵</title>
      <dc:creator>Suprabha</dc:creator>
      <pubDate>Wed, 29 Dec 2021 06:38:59 +0000</pubDate>
      <link>https://dev.to/suprabhasupi/stop-using-arraymap-everywhere-57lf</link>
      <guid>https://dev.to/suprabhasupi/stop-using-arraymap-everywhere-57lf</guid>
      <description>&lt;p&gt;&lt;span&gt;M&lt;/span&gt;ost of the time I used to see the snippet like this 👇&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;fruits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;apple&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;orange&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cherry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;main&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above snippet, we are adding &lt;code&gt;fruits&lt;/code&gt; text to the DOM in &lt;code&gt;main&lt;/code&gt; ID.&lt;br&gt;
It seems there is no issue in the above snippet, Though there is one major issue, which we will be going see today.&lt;/p&gt;

&lt;p&gt;Let's understand the issue by definition of &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;map()&lt;/code&gt; method creates a new array populated with the results of calling a provided function on every element in the calling array.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;example:&lt;/u&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;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&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="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// [3, 4, 5, 6]&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Using &lt;code&gt;map()&lt;/code&gt; method means returning a new collection of an array.&lt;/p&gt;

&lt;p&gt;As discussed, &lt;code&gt;map()&lt;/code&gt; method always returns a new array, so if you don’t have any use of a new array then never use &lt;code&gt;map()&lt;/code&gt; method.&lt;br&gt;
When you just need to iterate through an array, I will always recommend using other array methods like &lt;code&gt;forEach&lt;/code&gt; or &lt;code&gt;for..of&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;example:&lt;/u&gt;&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fruits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;apple&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;orange&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cherry&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;br&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;br&gt;
&lt;span class="nx"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myFunction&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;main&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;myFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;br&gt;
  &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;br&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Why do we care about it? 🙄&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;As we know, &lt;code&gt;map()&lt;/code&gt; method always returns an array. If you just need to update DOM then storing those elements into memory form doesn't add any point.&lt;br&gt;
Of course, for a small chunk of numbers nothing is going to happen, however, if we take a larger number here then it affects the performance side as it will store the value in memory which will be redundant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary  ⅀
&lt;/h3&gt;

&lt;p&gt;Stop using &lt;code&gt;map()&lt;/code&gt; method, if you just need to iterate through an array. &lt;br&gt;
Start using &lt;code&gt;forEach&lt;/code&gt; or &lt;code&gt;for...of&lt;/code&gt; method, if you want to iterate through an array.&lt;/p&gt;

&lt;p&gt;Thanks for reading the article ❤️&lt;br&gt;
Hope this post will be useful!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/suprabhasupi" 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%2Fi.imgur.com%2F4t25pJE.png" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;
        🌟 &lt;a href="https://twitter.com/suprabhasupi" rel="noopener noreferrer"&gt; Twitter&lt;/a&gt;
      &lt;/td&gt;
      &lt;td&gt;
        📚 &lt;a href="https://gum.co/css-pseudo-class-elements" rel="noopener noreferrer"&gt; Ebooks&lt;/a&gt;
      &lt;/td&gt;
&lt;td&gt;
        🌟 &lt;a href="https://www.instagram.com/suprabhasupi/" rel="noopener noreferrer"&gt; Instagram&lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
