<?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: vandna kapoor</title>
    <description>The latest articles on DEV Community by vandna kapoor (@vandnakapoor19).</description>
    <link>https://dev.to/vandnakapoor19</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F398312%2F78e73ab9-4249-492b-b0cc-f47247bcf441.jpg</url>
      <title>DEV Community: vandna kapoor</title>
      <link>https://dev.to/vandnakapoor19</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vandnakapoor19"/>
    <language>en</language>
    <item>
      <title>What if we gave the LLM access to tools and a memory?</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Sat, 05 Dec 2026 05:31:31 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/what-if-we-gave-the-llm-access-to-tools-and-a-memory-4din</link>
      <guid>https://dev.to/vandnakapoor19/what-if-we-gave-the-llm-access-to-tools-and-a-memory-4din</guid>
      <description>&lt;p&gt;Imagine touching the flame of a candle. It hurts, you connect the pain to what you just did, and you remember the experience the next time you’re near a flame.&lt;/p&gt;

&lt;p&gt;There are three parts to that experience. You took an action, you observed what happened, and you remembered enough to make a different decision next time.&lt;/p&gt;

&lt;p&gt;What if we built a similar loop around an LLM? That’s the basic idea behind an AI agent. The LLM helps decide what to do next. Tools let the agent look up information or take an action. Memory helps it keep track of what it tried and what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools give an agent access to the outside world
&lt;/h2&gt;

&lt;p&gt;Suppose you ask an LLM about something that happened this morning. If the application gives it a web search tool, the model can request a search and use the results to answer your question.&lt;/p&gt;

&lt;p&gt;The same idea applies to business systems. If you connect an agent to Jira, it could use a GET request to read a ticket, a POST request to create one, or a PATCH request to update a record in a system that supports it. The model decides which tool to request, and the application makes the call if it has permission.&lt;/p&gt;

&lt;p&gt;As software engineers, we already connect systems through APIs and events. An agent can use those same integrations. It could look up an error in CloudWatch, check whether a Jira ticket already exists, and create one if needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory helps an agent build on what it tried
&lt;/h2&gt;

&lt;p&gt;Say the agent tries to create the Jira ticket, but the API returns an error because a required field is missing. If the application keeps that result in the agent’s context, the model can use it to choose a better next step. It could ask for the missing detail before trying again.&lt;/p&gt;

&lt;p&gt;That’s where the candle example comes back. The agent took an action, observed the result, and used that information to decide what to do next. If it needs to pick up the task later, the application can save and retrieve that context.&lt;/p&gt;

&lt;p&gt;The tools and memory live in the application we build around the LLM. What makes the system agentic is how it uses them to work toward a goal, adjusting its next step based on what it finds.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>agentskills</category>
    </item>
    <item>
      <title>Four Limitations of LLMs and Why They Matter</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Thu, 03 Dec 2026 06:07:06 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/four-limitations-of-llms-and-why-they-matter-1hgi</link>
      <guid>https://dev.to/vandnakapoor19/four-limitations-of-llms-and-why-they-matter-1hgi</guid>
      <description>&lt;p&gt;Imagine talking to someone who could draw on books published through 2025. They might give you a great explanation of how airplanes fly. But ask whether your flight was delayed an hour ago, and they’d need to check a live source.&lt;/p&gt;

&lt;p&gt;That’s a simple way to understand one of the biggest limitations of large language models (LLMs). They can be great at answering questions and helping us solve problems. But many real-world tasks also require current information, the ability to take action, and a way to remember what happened along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. LLMs need access to fresh information
&lt;/h2&gt;

&lt;p&gt;An LLM learns from the data it was trained on. On its own, it doesn’t automatically learn what happened today. To answer a question about your flight, a model needs someone to provide the latest status or a connected tool that can look it up.&lt;/p&gt;

&lt;p&gt;Some information stays useful for years. Other information can change in minutes. If you’re building an app that checks whether an item is in stock, for example, the answer needs to come from the inventory system. Even an answer that was correct an hour ago might be wrong now.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. LLMs need tools to take action
&lt;/h2&gt;

&lt;p&gt;An LLM can draft an email or write a command for your terminal. Sending the email requires a connection to your email service. Running the command requires an environment where the code can execute. Both actions depend on what the application is allowed to do.&lt;/p&gt;

&lt;p&gt;This matters when you’re building something for a business. A support assistant can write a helpful reply from the information you give it. If you also want it to check a customer’s order status and update a support ticket, it needs access to those systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. LLMs can sound confident when they’re wrong
&lt;/h2&gt;

&lt;p&gt;An LLM can give you an answer that sounds convincing even when the information is made up. This is often called a &lt;strong&gt;hallucination&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Imagine asking for a timeline of Mars exploration and getting an entry that says, “Humans landed on Mars in 2024.” The sentence sounds like it belongs in a history book, but the event never happened. The same problem can show up in less obvious ways, like an assistant quoting a policy that doesn’t exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. LLMs need context to remember what happened
&lt;/h2&gt;

&lt;p&gt;If an LLM seems to remember what you said two minutes ago, the chat application may be including your earlier messages with your latest request. To recall something from a past chat or pick up a task later, the application needs a way to save and retrieve the relevant information.&lt;/p&gt;

&lt;p&gt;Imagine an assistant helping you troubleshoot a bug. It asks you to run a test, reads the result, and suggests a fix. If the first fix fails, it needs to know what you already tried and what happened. Otherwise, it might suggest the same thing again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Agentic AI comes in
&lt;/h2&gt;

&lt;p&gt;I like to think of a standalone LLM as a &lt;strong&gt;brain in a jar&lt;/strong&gt;. It can help you work through a problem, but it needs a connection to the outside world to look up live information or act on what it finds.&lt;/p&gt;

&lt;p&gt;That’s where Agentic AI comes in. An application can give the model tools, access to current information, and a way to keep track of its progress. For example, a support agent could read a customer’s message, look up the order, and draft a reply based on the actual shipping status. It could then ask a person to approve the reply before sending it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>agentskills</category>
      <category>programming</category>
    </item>
    <item>
      <title>Will Jev Replace LLMs? A Support Ticket Routing Example</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Wed, 23 Sep 2026 05:25:05 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/will-jev-replace-llms-a-support-ticket-routing-example-m2k</link>
      <guid>https://dev.to/vandnakapoor19/will-jev-replace-llms-a-support-ticket-routing-example-m2k</guid>
      <description>&lt;h1&gt;
  
  
  LLMs and Jev: When You Need a Decision Instead of a Reply
&lt;/h1&gt;

&lt;p&gt;Imagine a support application receiving this ticket:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I need a refund.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The application needs to decide where to send it: billing, product, or technical support. That is a small but important decision. Does it need a general-purpose language model to make it?&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an LLM do?
&lt;/h2&gt;

&lt;p&gt;A large language model (LLM), such as a model from OpenAI or Anthropic, is trained on large amounts of data and can understand and generate text. It can draft a reply, summarize a conversation, write code, or classify a support ticket.&lt;/p&gt;

&lt;p&gt;For our ticket, we could ask an LLM to choose a department and return &lt;code&gt;billing&lt;/code&gt;. It can do that. But if our application makes thousands of similar decisions, we should also consider the cost, response time, and reliability of the output format.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does Jev do?
&lt;/h2&gt;

&lt;p&gt;Jev is TypeSafe AI’s first &lt;em&gt;System One&lt;/em&gt; model. It accepts text and answers questions using defined output types. Instead of drafting a response to the customer, we give it the ticket and the permitted choices: &lt;code&gt;billing&lt;/code&gt;, &lt;code&gt;product&lt;/code&gt;, or &lt;code&gt;technical&lt;/code&gt;. It returns a choice with a probability estimate.&lt;/p&gt;

&lt;p&gt;That makes Jev useful for decisions inside an application, such as routing tickets or determining when a case needs review. It is not designed to write the customer’s reply, explain its reasoning in prose, or generate code. An LLM can handle those tasks elsewhere in the workflow.&lt;/p&gt;

&lt;p&gt;The probability estimate also gives us a way to handle uncertainty. For example, our application could route a clear refund request automatically and send an ambiguous ticket for human review. A probability is still an estimate; it does not guarantee that an individual decision is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  When would I use each one?
&lt;/h2&gt;

&lt;p&gt;Use an &lt;strong&gt;LLM&lt;/strong&gt; when the application needs to generate or explain something: a helpful customer response, a summary of a long ticket history, or code.&lt;/p&gt;

&lt;p&gt;Consider &lt;strong&gt;Jev&lt;/strong&gt; when the application needs to choose from a defined set of answers and use that choice in code. The two can work together: Jev routes the ticket, and an LLM drafts a response after the right team has the context.&lt;/p&gt;

&lt;p&gt;TypeSafe claims Jev can be substantially faster and cheaper on its &lt;em&gt;System One workflows&lt;/em&gt;. Its published “193.6× faster” figure is a company benchmark for those workflows, not a promise that every Jev call will be nearly 200 times faster than every LLM call. Measure both approaches on your own tickets before choosing one.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>JavaScript’s Role in Web Development: A Comprehensive Introduction</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Sun, 27 Jul 2025 14:55:29 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/javascripts-role-in-web-development-a-comprehensive-introduction-30ja</link>
      <guid>https://dev.to/vandnakapoor19/javascripts-role-in-web-development-a-comprehensive-introduction-30ja</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript (JS)&lt;/strong&gt; Possibly the most popular programming language in the world, JavaScript underpins the web by enabling dynamic and interactive pages. But its flexibility and versatility are available on a wide range of platforms beyond the browser, from servers and smartphones to embedded systems, and it has emerged as a way of creating rich, engaging applications on all those devices. Annual updates to the language introduce new features and improvements to the functionality, readability and performance of JavaScript. These updates also increase developer productivity, ensuring it’s a language that is fast to write and easy to get started with, keeping it relevant for increasingly challenging scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Brief History &amp;amp; Origins&lt;/strong&gt;&lt;br&gt;
JavaScript was created by Brendan Eich in just 10 days for the Netscape browser and was originally called Mocha, then LiveScript. Despite its quick start, it was inspired by languages like Scheme and Java, making it powerful and flexible. It became an official standard (ECMAScript) in 1997.&lt;/p&gt;

&lt;p&gt;Though updates slowed after ES5 in 2009, a strong community kept it evolving through libraries and frameworks. In 2015, ES6 brought major improvements and kicked off yearly updates that continue to enhance the language.&lt;/p&gt;

&lt;p&gt;JavaScript also expanded beyond the browser. With the release of Node.js in 2009, it became a full-stack language, running on servers and powering everything from web apps to backend systems.&lt;/p&gt;

&lt;p&gt;Standardized as ECMAScript in 1997, evolving through versions ES5, ES6 (2015), and annual updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where JavaScript Runs&lt;/strong&gt;&lt;br&gt;
Client-side: Every major browser includes a JS engine (V8, SpiderMonkey, JavaScriptCore).&lt;/p&gt;

&lt;p&gt;Server-side: With Node.js, JavaScript runs outside the browser, enabling full-stack development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features That Drive Popularity&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Versatile and ubiquitous:&lt;/strong&gt; Works across all major platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-paradigm:&lt;/strong&gt; Supports procedural, object-oriented, and functional programming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rich ecosystem:&lt;/strong&gt; npm, React, Angular, Vue, and more.&lt;/p&gt;

&lt;p&gt;It also has powerful tooling support, especially when used with TypeScript, a popular superset of JavaScript that adds static typing and better developer tooling. TypeScript enhances JavaScript with type safety, making it easier to manage large codebases and catch errors early during development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What You Can Build with JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Interactive web apps&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-page applications&lt;/strong&gt; using React js&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;APIs and backends&lt;/strong&gt; using Node.js&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile and desktop apps&lt;/strong&gt; using React Native and Electron&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Games, AI tools, and browser extensions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;With the combination of JavaScript, React.js for the UI layer, and TypeScript for type safety, developers can create high-performance, scalable apps for virtually any platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Community &amp;amp; Ecosystem&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Largest package ecosystem via &lt;strong&gt;npm&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Strong community support, frequent updates&lt;/li&gt;
&lt;li&gt;Supported by major companies like Google (Angular), Facebook (React), and Microsoft (TypeScript + VS Code)&lt;/li&gt;
&lt;li&gt;Modern editors and dev tools (like VS Code) are optimized for JavaScript and its ecosystem, including frameworks like React and languages like TypeScript.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Comparison with Other Languages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript vs Java&lt;/strong&gt;: Java is statically typed and compiled; JS is interpreted and dynamic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript vs Python&lt;/strong&gt;: Both are beginner-friendly, but JS dominates the browser space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript + TypeScript&lt;/strong&gt;: Many developers now prefer combining JS with TypeScript to get the best of both worlds — flexibility and structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript + React&lt;/strong&gt;: Developers can build highly responsive UIs with less code and better state control compared to older methods.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With growing support for &lt;strong&gt;WebAssembly&lt;/strong&gt;, serverless computing, and modern runtimes like &lt;strong&gt;Deno&lt;/strong&gt; and &lt;strong&gt;Bun&lt;/strong&gt;, JavaScript (along with tools like React and TypeScript) continues to shape the future of software development across browsers, servers, and beyond.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript remains the &lt;strong&gt;backbone of the web&lt;/strong&gt;, and with modern enhancements like React.js for UI and TypeScript for structure, the ecosystem is more powerful and developer-friendly than ever. Whether you’re just starting or building enterprise-grade applications, JavaScript is a must-learn skill for today’s tech world.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>learning</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Difference between HTML and React event handling</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Sun, 23 Jan 2022 04:20:37 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/difference-between-html-and-react-event-handling-59bh</link>
      <guid>https://dev.to/vandnakapoor19/difference-between-html-and-react-event-handling-59bh</guid>
      <description>&lt;p&gt;In terms of syntax and standards, HTML and React handle events differently because React is built on the notion of a virtual DOM, whereas HTML always has access to the Real DOM.&lt;/p&gt;

&lt;h3&gt;
  
  
  The following are the significant distinctions we will discuss:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In HTML, event names are written in lowercase, however in React, they are written in camelCase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In HTML, we may avoid default behavior by returning &lt;code&gt;false&lt;/code&gt;, but in React, we must call &lt;code&gt;preventDefault()&lt;/code&gt; explicitly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In HTML, the function is called by inserting "()" to the function name. If we don't want to utilize this way, we may use addEventLisener to provide events and listeners, however in React, we require the method name without the "()" appended.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  1) In HTML, event names are written in lowercase,
&lt;/h5&gt;

&lt;p&gt;Let us take a example where we would like to invoke click event on the button:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;button onclick='handleEvent()'&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  however in React, they are written in camelCase.
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;button onClick={handleEvent}&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2) In HTML, we may avoid default behavior by returning &lt;code&gt;false&lt;/code&gt;, but in React, we must call &lt;code&gt;preventDefault()&lt;/code&gt; explicitly
&lt;/h4&gt;

&lt;p&gt;Let's start by making a simple form and giving the input text a name. After submitting the form, we must call the 'onsubmit' event, and the form must not be refreshed.&lt;/p&gt;

&lt;h5&gt;
  
  
  HTML Example
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form onsubmit="console.log('You clicked submit.'); return false"&amp;gt;
   &amp;lt;input  type="text" name="name" /&amp;gt;
   &amp;lt;button type="submit"&amp;gt;Submit&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;

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

&lt;/div&gt;



&lt;h5&gt;
  
  
  React Example
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Form() {
  function handleSubmit(e) {
    e.preventDefault();
    console.log('You clicked submit.');
  }
 return (
   &amp;lt;form onsubmit="{handleSubmit}"&amp;gt;
    &amp;lt;input  type="text" name="name" /&amp;gt;
    &amp;lt;button type="submit"&amp;gt;Submit&amp;lt;/button&amp;gt;
   &amp;lt;/form&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3) In HTML, the function is called by inserting "()" to the function name. If we don't want to utilize this way, we may use addEventLisener to provide events and listeners, however in React, we require the method name without the "()" appended
&lt;/h4&gt;

&lt;h5&gt;
  
  
  HTML Example
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;button onclick='activateLasers()'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  React Example
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button onClick={activateLasers}&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>html</category>
      <category>react</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>NPM vs. YARN: Basic Commands</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Wed, 24 Nov 2021 21:16:05 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/npm-vs-yarn-basic-commands-3bl6</link>
      <guid>https://dev.to/vandnakapoor19/npm-vs-yarn-basic-commands-3bl6</guid>
      <description>&lt;p&gt;Here is a quick reference guide for basic commands that we can use when dealing with Node and requiring the use of NPM or YARN.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Install dependencies from package.json:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm install == yarn&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Install a package and add to package.json:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm install package --save == yarn add package&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Install a devDependency to package.json:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm install package --save-dev == yarn add package --dev&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Remove a dependency from package.json:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm uninstall package --save == yarn remove package&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Upgrade a package to its latest version:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm update --save == yarn upgrade&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h5&gt;
  
  
  Install a package globally:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;npm install package -g == yarn global add package&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>react</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Understanding the"this” Keyword in JavaScript</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Thu, 10 Sep 2020 15:32:20 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/understanding-the-this-keyword-in-javascript-g6h</link>
      <guid>https://dev.to/vandnakapoor19/understanding-the-this-keyword-in-javascript-g6h</guid>
      <description>&lt;p&gt;The &lt;code&gt;this&lt;/code&gt; keyword is a fundamental concept in JavaScript, and also an incredibly confusing one to both new developers and those who have experience in other programming languages. In JavaScript, &lt;code&gt;this&lt;/code&gt; is a reference to an &lt;code&gt;object&lt;/code&gt;. The object that this refers to can vary, &lt;code&gt;implicitly&lt;/code&gt; based on whether it is global, on an object, or in a constructor, and can also vary &lt;code&gt;explicitly&lt;/code&gt; based on usage of the Function prototype methods bind, call, and apply.&lt;/p&gt;

&lt;h4&gt;
  
  
  Here we will cover
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; in Global Environment&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; inside Functions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; in Methods&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; With the Call and Apply Methods&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; With the Bind Method&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;this&lt;/code&gt; With the Fat-Arrow Function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1) &lt;code&gt;this&lt;/code&gt; in Global Environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By default, the execution context for any execution is global, which means if we are running any simple function, then &lt;code&gt;this&lt;/code&gt; refers to a &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Global_object" rel="noopener noreferrer"&gt;global object&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"As we know &lt;code&gt;window&lt;/code&gt; is the global object in the case of the &lt;code&gt;browser&lt;/code&gt;, However, if we are using  &lt;code&gt;NodeJS&lt;/code&gt;, then a special object &lt;code&gt;global&lt;/code&gt; is the global object."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;On Browser&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;function&lt;/span&gt; &lt;span class="nf"&gt;foo&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Simple function call&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;//prints true on console&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;When a function is invoked with the &lt;code&gt;new keyword&lt;/code&gt;, then the function is known as a constructor function and returns a new instance. In such cases, the value of this refers to a newly created instance.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;foo&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Simple function call&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nb"&gt;window&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//prints false on console&lt;/span&gt;

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

&lt;/div&gt;


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

&lt;p&gt;&lt;code&gt;Using Node&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; this === global
true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;2) &lt;code&gt;this&lt;/code&gt; inside Functions&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;heroName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;realName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;realName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;realName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;heroName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;heroName&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;superman&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Superman&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;Clark Kent&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;superman&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;Note that this function is not written in strict mode. Running this code in the &lt;strong&gt;node&lt;/strong&gt; will not get us the value of &lt;code&gt;Superman&lt;/code&gt; and &lt;code&gt;Clark Kent&lt;/code&gt; as we expected, but it will instead just give us an &lt;strong&gt;undefined&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The reason behind this is that since the function is not written in &lt;code&gt;strict mode&lt;/code&gt;*, this refers to the global object.&lt;/p&gt;

&lt;p&gt;If we run this code in &lt;code&gt;strict mode&lt;/code&gt;, we will get an error because JavaScript does not allow us to assign properties &lt;code&gt;realName&lt;/code&gt; and &lt;code&gt;"heroName&lt;/code&gt; to undefined. This is a good thing because it prevents us from creating global variables.&lt;/p&gt;

&lt;p&gt;Lastly, writing the function’s name in uppercase means that we need to call it as a constructor using the new operator. Replace the last two lines of the above code snippet with this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;heroName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;realName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;realName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;realName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;heroName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;heroName&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;superman&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Superman&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;Clark Kent&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;superman&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;&lt;strong&gt;3) &lt;code&gt;this&lt;/code&gt; in Methods&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hero&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;heroName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Batman&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nf"&gt;dialogue&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`I am &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;heroName&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="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;hero&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dialogue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3w7xg1qrkjxrpsq852dq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3w7xg1qrkjxrpsq852dq.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;4) &lt;code&gt;this&lt;/code&gt; With the Call and Apply Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;call and apply are very similar-they invoke a function with a specified this context and optional arguments.&lt;/p&gt;

&lt;p&gt;The only &lt;code&gt;difference between call and apply&lt;/code&gt; is that call requires the arguments to be passed in one-by-one, and apply takes the arguments as an array.&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;book&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Brave New World&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Aldous Huxley&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;function&lt;/span&gt; &lt;span class="nf"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; was written by &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;author&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="nf"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;Since summary and book have no connection, invoking summary by itself will only print &lt;code&gt;undefined&lt;/code&gt;, as its looking for those properties on the global object.&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;book&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Brave New World&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Aldous Huxley&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;let&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;abc&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;author&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;test&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="nf"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; was written by &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;author&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="nx"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;book&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// or:&lt;/span&gt;
&lt;span class="nx"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;book&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;&lt;strong&gt;5) &lt;code&gt;this&lt;/code&gt; With the Bind Method&lt;/strong&gt;&lt;br&gt;
The bind method returns a new method with this referring to the first argument passed. We’re going to use the above example to explain the bind method.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ln&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ln&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;displayName&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="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="s2"&gt;`Name: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;first_name&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="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last_name&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="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&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;Reed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;displayName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Prints Name: John Reed&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Paul&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;Adams&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;displayName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Prints Name: Paul Adams&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person2Display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;displayName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Creates new function with value of “this” equals to person2 object&lt;/span&gt;
&lt;span class="nf"&gt;person2Display&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Prints Name: Paul Adams&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


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

&lt;p&gt;&lt;strong&gt;6) &lt;code&gt;this&lt;/code&gt; With the Fat-Arrow Function&lt;/strong&gt;&lt;br&gt;
unlike Regular functions, the arrow function does not have their own &lt;code&gt;this&lt;/code&gt; keyword.&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;The value of this inside an arrow function remains the same throughout the lifecycle of the function and is always bound to the value of this in the closest non-arrow parent function.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;


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

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

</description>
      <category>javascript</category>
      <category>node</category>
      <category>react</category>
    </item>
    <item>
      <title>The Difference Between Regular Functions and Arrow Functions</title>
      <dc:creator>vandna kapoor</dc:creator>
      <pubDate>Wed, 12 Aug 2020 02:28:12 +0000</pubDate>
      <link>https://dev.to/vandnakapoor19/the-difference-between-regular-functions-and-arrow-functions-j7d</link>
      <guid>https://dev.to/vandnakapoor19/the-difference-between-regular-functions-and-arrow-functions-j7d</guid>
      <description>&lt;p&gt;Arrow function — also called fat arrow function — is a new feature introduced in ES6 that is a more concise syntax for a writing function expression.&lt;/p&gt;

&lt;h4&gt;
  
  
  Following are the main differences:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Syntax&lt;/li&gt;
&lt;li&gt;Arguments binding&lt;/li&gt;
&lt;li&gt;Use of this keyword&lt;/li&gt;
&lt;li&gt;Using a new keyword&lt;/li&gt;
&lt;li&gt;No duplicate named parameters&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  1) Syntax:
&lt;/h4&gt;


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


&lt;p&gt;A developer can get the same result as regular functions by writing a few lines of code using arrow functions.&lt;/p&gt;

&lt;p&gt;Curly brackets are not required if only one expression is present.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let add = (x, y) =&amp;gt; x + y;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If there’s only one argument, then the parentheses are not required either:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let squareNum = x =&amp;gt; x * x;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  2) Arguments binding
&lt;/h4&gt;

&lt;p&gt;Arrow functions do not have arguments binding.&lt;/p&gt;
&lt;h6&gt;
  
  
  Regular Function
&lt;/h6&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Object with Regular function.&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// Regular function&lt;/span&gt;
    &lt;span class="na"&gt;showArg&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;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;arguments&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;getData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;showArg&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="c1"&gt;// output {0:1,1:2,2:3}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h6&gt;
  
  
  Output
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cV3cwUnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9re38hysbredza2spk8j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cV3cwUnJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9re38hysbredza2spk8j.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6&gt;
  
  
  Arrow Function:
&lt;/h6&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Object with Arrow function.&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;getData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// Arrow function&lt;/span&gt;
    &lt;span class="na"&gt;showArg&lt;/span&gt;&lt;span class="p"&gt;:()&lt;/span&gt;&lt;span class="o"&gt;=&amp;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;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;getData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;showArg&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="c1"&gt;// Uncaught ReferenceError: arguments is not defined&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h6&gt;
  
  
  Output
&lt;/h6&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X9AhaJEm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5o050o99h1zr0434neyo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X9AhaJEm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5o050o99h1zr0434neyo.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  3) Use of this keyword
&lt;/h4&gt;

&lt;p&gt;unlike Regular functions, arrow function does not have their own "this" keyword.&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;The value of this inside an arrow function remains the same throughout the lifecycle of the function and is always bound to the value of this in the closest non-arrow parent function.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;


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

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oXaKG_Aq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f93aha2je1ybp8nxzcx3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oXaKG_Aq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f93aha2je1ybp8nxzcx3.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4) Using a new keyword
&lt;/h4&gt;

&lt;p&gt;Regular functions created using function declarations or expressions are constructible and callable. Regular functions are constructible; they can be called using the new keyword.&lt;/p&gt;

&lt;p&gt;However, the arrow functions are only callable and not constructible, i.e., arrow functions can never be used as constructor functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Regular function&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IErZqbIJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6fe0l4byw1pmm3vzwg21.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IErZqbIJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6fe0l4byw1pmm3vzwg21.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arrow function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let add = (x, y) =&amp;gt; console.log(x + y);
new add(2,3);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bNP8a6e_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/90k4c0if5gm7jh0uj7qr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bNP8a6e_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/90k4c0if5gm7jh0uj7qr.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  5) No duplicate named parameters
&lt;/h4&gt;

&lt;p&gt;Arrow functions can never have duplicate named parameters, whether in strict or non-strict mode.&lt;/p&gt;

&lt;p&gt;However, We can use duplicate named parameters for regular function in non-strict mode.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>node</category>
    </item>
  </channel>
</rss>
