<?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: Aman Agrawal</title>
    <description>The latest articles on DEV Community by Aman Agrawal (@amanagrwl).</description>
    <link>https://dev.to/amanagrwl</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%2F402534%2F2bb3f112-66d1-4299-bb93-c44ab21e5509.png</url>
      <title>DEV Community: Aman Agrawal</title>
      <link>https://dev.to/amanagrwl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amanagrwl"/>
    <language>en</language>
    <item>
      <title>Different ways to use environment variables in Golang</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Mon, 28 Sep 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/different-ways-to-use-environment-variables-in-golang-cg6</link>
      <guid>https://dev.to/loginradius/different-ways-to-use-environment-variables-in-golang-cg6</guid>
      <description>&lt;p&gt;Learn about environment variables and different ways to use them in your Golang application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/environment-variables-in-golang/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>environmentvariables</category>
    </item>
    <item>
      <title>Classes in JavaScript</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Mon, 01 Jun 2020 09:59:47 +0000</pubDate>
      <link>https://dev.to/amanagrwl/classes-in-javascript-coj</link>
      <guid>https://dev.to/amanagrwl/classes-in-javascript-coj</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Snd3Lo7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AGp4wMLdcZ3h2sRMIpx9E8A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Snd3Lo7M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AGp4wMLdcZ3h2sRMIpx9E8A.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Introduced in ES6, classes are simply the syntactical sugar over function prototyping.&lt;/p&gt;

&lt;p&gt;A class is a type of function, but instead of using the keyword function to initiate it, we use the keyword class, and the properties are assigned inside a constructor() method.&lt;/p&gt;

&lt;h3&gt;
  
  
  Class Basic syntax
&lt;/h3&gt;

&lt;p&gt;Use the keyword class to create a class, and always add the constructor() method. The constructor method is called each time the class object is initialized. After adding a constructor method we can add other methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ClassName {
  // class methods
  constructor() { ... }
  method1() { ... }
  method2() { ... }
  method3() { ... }
  ...
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;A simple class definition for a class named “Product”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Class Vehicle{
 constructor(brand) {
   this.carname = brand;
 }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now you can create objects using the &lt;code&gt;Vehicle&lt;/code&gt; class:&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Vehicle {
  constructor(brand) {
    this.brand = brand;
  }
}
mycar = new Vehicle("Toyota");
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Methods
&lt;/h3&gt;

&lt;p&gt;A class in ES6 contains methods for functioning, out of which the constructor method is special, where you initialize properties and called automatically when a class is initiated, &lt;strong&gt;and it has to have the exact name “constructor”&lt;/strong&gt; , in fact, if you do not have a constructor method, JavaScript will add an &lt;em&gt;invisible and empty&lt;/em&gt; constructor method.&lt;/p&gt;

&lt;p&gt;However we are also free to make our own methods, the syntax should be as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Vehicle {
  constructor(brand) {
    this.brand = brand;
  }
  print() {
    return "I have a vehicle of the brand" + this.brand;
  }
}

mycar = new Vehicle("Toyota");
document.getElementById("demo").innerHTML = mycar.print();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Inheritance
&lt;/h3&gt;

&lt;p&gt;To create a class inheritance, use the extends keyword.&lt;/p&gt;

&lt;p&gt;A class created with a class inheritance inherits all the methods from another class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Car {
  constructor(brand) {
    this.brand = brand;
  }
  print() {
    return "I have a vehicle of the brand" + this.brand;
  }
}

class Car extends Vehicle {
  constructor(brand, mod) {
    super(brand);
    this.model = mod;
  }
  show() {
    return this.print() + ', it is a ' + this.model;
  }
}

mycar = new Car("Hyundai", "Verna");
document.getElementById("demo").innerHTML = mycar.show();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important Note&lt;/strong&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A common pitfall for novice developers is to put a comma between class methods, which would result in a syntax error.&lt;/p&gt;

&lt;p&gt;The notation here is not to be confused with object literals. Within the class, no commas are required.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
      <category>class</category>
      <category>oopsconcepts</category>
      <category>es6</category>
    </item>
    <item>
      <title>StackExchange - The 8 best resources every developer must follow</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Sat, 25 Apr 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/stackexchange-the-8-best-resources-every-developer-must-follow-1e9o</link>
      <guid>https://dev.to/loginradius/stackexchange-the-8-best-resources-every-developer-must-follow-1e9o</guid>
      <description>&lt;p&gt;As a developer, you should be familiar with StackExchange. There are tons of resources available on there about software development and programming. Out of everything, I have compiled a list of the top 8 resources that I find helpful. These resources cover a wide range of topics…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/stackexchange-8-best-resources-every-developer-must-follow/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programmer</category>
      <category>skills</category>
    </item>
    <item>
      <title>Nim Game, Add Digits, Maximum Depth of Binary Tree</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Tue, 24 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/nim-game-add-digits-maximum-depth-of-binary-tree-p3i</link>
      <guid>https://dev.to/loginradius/nim-game-add-digits-maximum-depth-of-binary-tree-p3i</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Nim Game Click to View Original Question This question is very easy once you figure out the trick behind the game. Since each time you can only pick 3 stones at most, if there are 4 stones originally on the table, no matter how many you take ... your hopefully non-stupid…&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/nim-game-add-digits-maximum-depth-of-binary-tree/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nim</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The truth about CSS preprocessors and how they can help you</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Tue, 17 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/the-truth-about-css-preprocessors-and-how-they-can-help-you-4ncd</link>
      <guid>https://dev.to/loginradius/the-truth-about-css-preprocessors-and-how-they-can-help-you-4ncd</guid>
      <description>&lt;p&gt;As a preface to this article: preprocessors can be used for a variety of file types, but this article is going to focus solely on CSS preprocessors. Additonally I'm going to try and avoid my personal bias and give a very generic description of CSS preprocessors rather than my…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/the-truth-about-css-preprocessors-and-how-they-can-help-you/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>Beginner's Guide for Sublime Text 3 Plugins</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Tue, 10 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/beginner-s-guide-for-sublime-text-3-plugins-3fcb</link>
      <guid>https://dev.to/loginradius/beginner-s-guide-for-sublime-text-3-plugins-3fcb</guid>
      <description>&lt;p&gt;Getting started with one of the lightweight Code Editor Sublime Text and introduction to Snippets, Project and Macros&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/beginners-guide-for-sublime-text-3-part-2/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sublimetext</category>
      <category>codeeditor</category>
    </item>
    <item>
      <title>Displaying the LoginRadius interface in a pop-up</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Mon, 09 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/displaying-the-loginradius-interface-in-a-pop-up-2nme</link>
      <guid>https://dev.to/loginradius/displaying-the-loginradius-interface-in-a-pop-up-2nme</guid>
      <description>&lt;p&gt;In order to display your LoginRadius Login Interface in a pop-up you can leverage Jquery-ui which is a well documented, easy-to-use library that allows you to handle some common functionality such as pop-up dialogs and other UI features. In this article we go over the steps to…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/displaying-the-loginradius-interface-in-a-pop-up/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>login</category>
      <category>ui</category>
      <category>loginradiusinterface</category>
    </item>
    <item>
      <title>Optimize jQuery &amp; Sizzle Element Selector</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Thu, 05 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/optimize-jquery-sizzle-element-selector-407j</link>
      <guid>https://dev.to/loginradius/optimize-jquery-sizzle-element-selector-407j</guid>
      <description>&lt;p&gt;Almost every active website worldwide uses jQuery, you can check stats here , but using it without optimization might make the DOM very slow. The same goes for other javascript libraries, such as SizzleJS. To ensure the performance of your DOM, you have to follow some best…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/optimize-jquery-sizzle-element-selector/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>engineering</category>
      <category>jquery</category>
    </item>
    <item>
      <title>Maintain Test Cases in Excel Sheets</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Tue, 03 Nov 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/maintain-test-cases-in-excel-sheets-3ekk</link>
      <guid>https://dev.to/loginradius/maintain-test-cases-in-excel-sheets-3ekk</guid>
      <description>&lt;p&gt;Learn how to maintain test cases in Excel sheets&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/how-to-maintain-test-cases-in-excel-sheets/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>excel</category>
      <category>tes</category>
    </item>
    <item>
      <title>Separate Drupal Login Page for Admin and User</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Thu, 29 Oct 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/separate-drupal-login-page-for-admin-and-user-4o62</link>
      <guid>https://dev.to/loginradius/separate-drupal-login-page-for-admin-and-user-4o62</guid>
      <description>&lt;p&gt;Are you afraid of hackers and feel unsafe for admin and front user to login through same area? No need to worry as in this article, I am going to guide you with how to create separate login area for admin. Along with that, I will also provide the required steps to disable…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/separate-login-page-for-admin-and-user/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>adminpanel</category>
    </item>
    <item>
      <title>How to Get Email Alerts for Unhandled PHP Exceptions</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Mon, 26 Oct 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/how-to-get-email-alerts-for-unhandled-php-exceptions-3akf</link>
      <guid>https://dev.to/loginradius/how-to-get-email-alerts-for-unhandled-php-exceptions-3akf</guid>
      <description>&lt;p&gt;This tutorial provides a solution to get email alerts, when a unhandled error occurs. For this tutorial, we are using WordPress. Imagine you created a php application and it’s running fine.  A couple of days later, a user complains about an error which you’re totally unaware of…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/how-to-get-email-alerts-for-unhandled-php-exceptions/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>email</category>
    </item>
    <item>
      <title>ElasticSearch Analyzers for Emails</title>
      <dc:creator>Aman Agrawal</dc:creator>
      <pubDate>Thu, 15 Oct 2015 00:00:00 +0000</pubDate>
      <link>https://dev.to/loginradius/elasticsearch-analyzers-for-emails-3nmo</link>
      <guid>https://dev.to/loginradius/elasticsearch-analyzers-for-emails-3nmo</guid>
      <description>&lt;p&gt;So last week while I was setting the analyzers on ElasticSearch settings for Email field, it took me some good time to find the perfect custom analyzer for my purpose, so I feel it might be useful to share this with someone who needs it. When a document is indexed, its individual…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.loginradius.com/engineering/blog/elastic-search-analyzers-for-emails/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>analyzers</category>
    </item>
  </channel>
</rss>
