<?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>Forem: Balaji Chennupati</title>
    <description>The latest articles on Forem by Balaji Chennupati (@balajich004).</description>
    <link>https://forem.com/balajich004</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%2F1562424%2Fa8abc9e9-ed96-4637-94ff-f12667e0b8b4.jpg</url>
      <title>Forem: Balaji Chennupati</title>
      <link>https://forem.com/balajich004</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/balajich004"/>
    <language>en</language>
    <item>
      <title>The "this" confusion in JS: function vs arrow</title>
      <dc:creator>Balaji Chennupati</dc:creator>
      <pubDate>Fri, 14 Jun 2024 09:16:22 +0000</pubDate>
      <link>https://forem.com/balajich004/the-this-confusion-in-js-function-vs-arrow-11lj</link>
      <guid>https://forem.com/balajich004/the-this-confusion-in-js-function-vs-arrow-11lj</guid>
      <description>&lt;p&gt;Hey there, Good to see you back again!, In this blog I would like to clear a common confusion for many js beginners, the "this" confusion while using it b/w arrow and normal functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Standard function's perspective of this keyword
&lt;/h2&gt;

&lt;p&gt;"this" is a keyword in js which is normally used to refer the object that we are currently working with or in terms of methods "this" refers to the object in which the method is located at.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj={
  name:"bj",
  info:function(){
        console.log(this.name);
       }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above is a simple object representation in js with a name attribute and an info method now when we call the obj.info() what do you think it console logs?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bj
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yep! it prints the name of obj. But if write the same code outside of the object in the global execution context then "this " references to window object which is the initial global object in browser by default and it may vary from run time to run time.&lt;/p&gt;

&lt;p&gt;So by this I would like to very much say that the default global object for any standard function is global object, but if working with any object then it becomes the this reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Arrow functions perspective of this keyword
&lt;/h2&gt;

&lt;p&gt;In terms of arrow functions things slightly change, Let's write the same object above but in terms of arrow function this time and see what it outputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj={
  name:"bj",
  info:()=&amp;gt;{
        console.log(this.name);
       }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now what do you think happens when i do the method call obj.info() well you might think we just changed the syntax but working is same, Well I am sorry to say but you are wrong mate. The standard functions in js by default have their own scope whereas arrow functions highly depend on lexical scope (simply scope around it) since the global scope refers to window object and window object does not have a name property we get the value undefined as output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;undefined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So by the end of this blog, What I would like to share with you is try to  use this keyword only in standard functions and constructors, try not to use this in ES6 star boys (arrow functions 😉) and try to understand how they work.&lt;/p&gt;

&lt;p&gt;That's it for this blog, Catch you in the next one till then Adios.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>node</category>
    </item>
    <item>
      <title>My experience with Arc for Windows</title>
      <dc:creator>Balaji Chennupati</dc:creator>
      <pubDate>Sun, 02 Jun 2024 16:44:03 +0000</pubDate>
      <link>https://forem.com/balajich004/my-experience-with-arc-for-windows-42i1</link>
      <guid>https://forem.com/balajich004/my-experience-with-arc-for-windows-42i1</guid>
      <description>&lt;p&gt;So I have recently used the latest release of arc for windows and I should say, This is a new experience in perspective of a browser user. Well in this post I would like to share my experience with arc and how it made my project development a lot productive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bugs noticed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; The first bug I noticed was the problem in resizing the address bar. I have mailed issue to the browser company and they have taken care of it in the next 2 updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyyl8ie0nxaue0zo9dawo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyyl8ie0nxaue0zo9dawo.png" alt="Image description" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; The next one I found out was the lack of sink b/w the profiles. Even after deleting a profile it still exists in your user settings which is kind of junky. Mailed it too still not updated..!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now since this is just the initial release phase of the browser there might be a lot of issues being faced by the company and given it's size they are handling those pretty good. We can hope to have a better product with fewer bugs in the upcoming days.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now coming to the pros, First of all the ui is awesome this is for people who like classic themes and don't like all the funky stuff.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Coming to features there aren't a bagload available but there are a lot of product features available like folder management, pinned sites and most unique thing spaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even though we have had bookmark folders before I feel this browser took it to the next level by actually motivating us to use those bookmarks rather just bookmarking and forgetting them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There are a lot of great stuff, in this browser but above are the stuff I felt useful for me.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I feel this is a great browser at it's initial phase of release but there are few things that are yet to be resolved and lot of features that are yet to be available, But finally out and out a solid product at this stage but by the next year it can be a must use product. &lt;/p&gt;

</description>
      <category>browser</category>
      <category>internet</category>
      <category>productivity</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
