<?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: Biplab Malakar</title>
    <description>The latest articles on DEV Community by Biplab Malakar (@bapinmalakar).</description>
    <link>https://dev.to/bapinmalakar</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%2F289395%2Fcd5f471d-4ceb-4f7b-9c2d-7bcc4e469d94.jpeg</url>
      <title>DEV Community: Biplab Malakar</title>
      <link>https://dev.to/bapinmalakar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bapinmalakar"/>
    <language>en</language>
    <item>
      <title>#JavaScript 2019#New in ES</title>
      <dc:creator>Biplab Malakar</dc:creator>
      <pubDate>Thu, 26 Dec 2019 11:16:39 +0000</pubDate>
      <link>https://dev.to/bapinmalakar/javascript-2019-new-in-es-481m</link>
      <guid>https://dev.to/bapinmalakar/javascript-2019-new-in-es-481m</guid>
      <description>&lt;p&gt;JavaScript-2019 added so many new in build functionality which are very helpful. In this article I am going to discuss those functionality and new features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Class
&lt;/h2&gt;

&lt;p&gt;Add new symbol to define private variables in class(#)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example for simple variable and function
class Scipt2019Class {
    user_name ="Biplab Malakar"; // public field
    #user_phone_number = "9592350924"; //private variable
    constructor() { }
    getName() { //public function
       return this.user_name;
    }
    #get Age() { // private function
       return this.#user_phone_number;
   }
}

Example for static variable and static function
class StaticClass{
    static #designation = 'Software Developer"; // static variable
    static getDesignation(){
       return StaticClass.#designation;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  New trim function.
&lt;/h2&gt;

&lt;p&gt;Functionality as trim with new features&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const first_name = "        Biplab ";
const last_name ="Malakar      ";
const full_name = first_name.trimStart() + last_name.trimEnd();
console.log('Full name is:  ', full_name);
// trimStart() trim form the beginning only
// trimEnd() trim from end only
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Big Integer
&lt;/h2&gt;

&lt;p&gt;In javascript to define big integer we used Number.MAX_SAFE_INTEGER(2^53).Now we can use BigInt() to define large number which is larger than current maximum value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//'n' syntax to declare BigInt
const big_number_1 = 9100000000000001n;
//use BigInt() constructor
const big_number_2 = BigInt(9100000000000002);
//BigInt() constructor with string
const big_number_2 = BigInt('9100000000000002');
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Array Functions
&lt;/h2&gt;

&lt;p&gt;Before 2019 new function we use our own login to make dimensional array form multi-dimensional array. Now JavaScript provide flat() and flatMap() to generate single dimensional array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//flat()
const array = [1,[2,3],[4,5,[6,7,[8,9]]]]; 
array.flat(3); //  [1, 2, 3, 4, 5, 6, 7, 8, 9]
// flat(n); n is the depth by default depth is 1
array.flat();//[1, 2, 3, 4, 5, [6,7,[8,9]]]; //it extend upto depth 1
array.flat(2) // [1,2,3,4,5,6,7,[8,9]]; // it extend upto depth 2

//flatMap() same as map() but instead of return nested array it will return one-dimensional array

const sentence = ['I am', 'Biplab Malakar'];
let step_1 =  sentence.map(d=&amp;gt; d.split(' '));// [['I', 'am'], ['Biplab', 'Malakar']]
let step_2 = step_1.flatMap(d=&amp;gt; d);// ['I', 'am', 'Biplab', 'Malakar']
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Object Creation from array
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We can create object from one-dimensional array
const obj = Object.assign({}, [1,2,3,4,5]); // {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}
// if it's tow-dimensional array [['a', 2], ['b',4], ['c', 6]] and 
//I want object {a: 2, b: 4, c: 6}
const obj_2 = Object.fromEntries( [['a', 2], ['b',4], ['c', 6]]); // {a: 2, b: 4, c: 6}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  reduceRight()
&lt;/h2&gt;

&lt;p&gt;It's a new JavaScript(2019) array function. This function is same as reduce() function with the feature that it start evaluating from right to left.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const charArray = ['e','s','r','e','v','e','r'];
const word = charArray.reduce((ac, c)=&amp;gt; ac+c);
console.log('word is: ', word); // esrever
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It starts evaluating from left and we get a string "esrever". Now if I want to evaluate this array from right so that my output is "reverse". This can be achieved by reduceRight()&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const charArray = ['e','s','r','e','v','e','r'];
const word = charArray.reduceRight((ac, c)=&amp;gt; ac+c);
console.log('word is: ', word); // reverse
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  copyWithin()
&lt;/h2&gt;

&lt;p&gt;This is also a new JavaScript(2019) array function. This function has feature to copy array element inside itself and output is reflected on original array. I know its confusing about what I am saying, lets look into example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [1,2,3,4,5];
array.copyWithin(1);
console.log(array);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The output is [1,1,2,3,4]. array.copyWithin() this function copies your array elements  and start place copy array from specified index. During the copy it will maintain the original size of the array. Consider  the above example&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;array.copyWithin(1), copy the all element of array and place this array from index 
1.&lt;/li&gt;
&lt;li&gt;copy array is [1,2,3,4,5]. Original array size is 5. When it start placing element then it found that it extend the original size, so its ignore element 5.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [1,2,3,4,5];
array.copyWithin(2);
console.log(array); // [1,2,1,2,3]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can also define from which element it should start copy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;array.copyWithin(place_index, start_from_index);
array.copyWithin(1, 2);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;First Argument 1, denote copy array should be place from index 1.&lt;/li&gt;
&lt;li&gt;Second Argument 2, denote start copy elements from index 2. So copy items
 are 3,4,5
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [1,2,3,4,5];
array.copyWithin(1,2);
console.log(array); // [1, 3,4,5,5]
#5 prints two times because after 3,4,5 no element is left
#so last 5 remain its position
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;array.copyWithin(start_placing_index, start_from_index, end_index);&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [1,2,3,4,5];
array.copyWithin(2,3, 5); 
# start copy from index 3  to 5-1 index and start place from index 2
console.log(array); // [1,2,4,5,5]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Apart from those so many changes are proposed like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Import  &lt;a href="https://github.com/tc39/proposal-dynamic-import"&gt;Read&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON.stringify &lt;a href="https://github.com/tc39/proposal-well-formed-stringify"&gt;Read&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;import.meta &lt;a href="https://github.com/tc39/proposal-import-meta"&gt;Read&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;globalThis &lt;a href="https://github.com/tc39/proposal-global"&gt;Read&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>es6</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JavaScript Inheritance Prototype Vs Class</title>
      <dc:creator>Biplab Malakar</dc:creator>
      <pubDate>Tue, 10 Dec 2019 12:31:10 +0000</pubDate>
      <link>https://dev.to/bapinmalakar/javascript-inheritance-prototype-vs-class-4o8k</link>
      <guid>https://dev.to/bapinmalakar/javascript-inheritance-prototype-vs-class-4o8k</guid>
      <description>&lt;p&gt;Before ES6 JavaScript doesn't support class like OOPs but we can code class and inheritance using &lt;strong&gt;"Prototype"&lt;/strong&gt;. &lt;/p&gt;

&lt;h1&gt;
  
  
  Today we are going do some code to implement inheritance using both prototype(ES5) and class(ES6).
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;The prototype is an object that is associated with every functions and objects by default in JavaScript, where function's prototype property is accessible and modifiable and object's prototype property (aka attribute) is not visible.&lt;br&gt;
Every function and object includes prototype object by default.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://www.tutorialsteacher.com/javascript/prototype-in-javascript"&gt;tutorialsteacher&lt;/a&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Start with code rather then talking
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8vtFkyKh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572451107454/s165n1QU7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8vtFkyKh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572451107454/s165n1QU7.gif" alt="do_this.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A. Simple Inheritance
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;Like every children has parents , so we are going to create one Parent class  to manipulate and store the parent information then inherit the Child class from Parent class *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jEvoI7oB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572540553560/CXDQgfzsG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jEvoI7oB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572540553560/CXDQgfzsG.png" alt="Screenshot 2019-10-31 at 10.18.48 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Prototype
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Parent = function(father_name, mother_name, city_name) {
  this.father_name = father_name;
  this.mother_name = mother_name;
  this.city_name = city_name;

  this.printParentDetails= ()=&amp;gt;{
    console.log('Father Name: ', this.father_name);
    console.log('Mother Name: ', this.mother_name);
    console.log('They live in: ', this.city_name);
  }
}

const Child = function(father_name, mother_name,city_name, name, age) {
  Parent.call(this,father_name,  mother_name, city_name);
  this.name = name;
  this.age = age;

  this.printChildDetails = ()=&amp;gt;{
      this.printParentDetails();
      console.log('Child name is: ', this.name);
      console.log('Child age is: ', this.age);
  }
}

Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;

const child_1 = new Child('Jonny', 'Jolly', 'New York', 'Jin', 18);
const child_2 = new Child('Ram', 'Sham', 'Mumbai', 'Jadu', 21);

child_1.printChildDetails();
child_2.printChildDetails();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Parent.call(this,father_name,  mother_name, city_name) &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It will bind our &lt;strong&gt;Parent class&lt;/strong&gt; within the &lt;strong&gt;Child class&lt;/strong&gt; context.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Child.prototype = Object.create(Parent.prototype)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Assign &lt;strong&gt;Parent prototype&lt;/strong&gt; to &lt;strong&gt;Child Prototype&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Child.prototype.constructor = Child&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The constructor of Child class should be &lt;strong&gt;Child constructor&lt;/strong&gt;, not &lt;strong&gt;Parent  class constructor&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using ES6 class
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Parent {
  constructor(father_name, mother_name, city_name) {
    this.father_name = father_name;
    this.mother_name = mother_name;
    this.city_name = city_name;
  }

  printParentDetails(){
    console.log('Father Name: ', this.father_name);
    console.log('Mother Name: ', this.mother_name);
    console.log('They live in: ', this.city_name);
  }
}

class Child extends Parent{
  constructor(father_name, mother_name,city_name, name, age) {
    super(father_name,  mother_name, city_name);
    this.name = name;
    this.age = age;
  }

  printChildDetails(){
      this.printParentDetails();
      console.log('Child name is: ', this.name);
      console.log('Child age is: ', this.age);
  }
}


const child_1 = new Child('Jonny', 'Jolly', 'New York', 'Jin', 18);
const child_2 = new Child('Ram', 'Sham', 'Mumbai', 'Jadu', 21);

child_1.printChildDetails();
child_2.printChildDetails();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  B. Multiple Inheritance
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Like every child belongs to the country also, so we are going to create a **Country class&lt;/strong&gt;. And the &lt;strong&gt;Child class&lt;/strong&gt; going to inherit from Both Parent and Country class**&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n5wPpC3D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572540920049/fVO3n_URn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n5wPpC3D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572540920049/fVO3n_URn.png" alt="Screenshot 2019-10-31 at 10.25.05 PM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Prototype
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Parent = function(father_name, mother_name, city_name) {
  this.father_name = father_name;
  this.mother_name = mother_name;
  this.city_name = city_name;

  this.printParentDetails= ()=&amp;gt;{
    console.log('Father Name: ', this.father_name);
    console.log('Mother Name: ', this.mother_name);
    console.log('They live in: ', this.city_name);
  }
}

const Country = function(country_name, country_code) {
  this.country_name = country_name;
  this.country_code = country_code;

  this.printCountryDetails= ()=&amp;gt; {
    console.log('Country Name: ', this.country_name);
    console.log('Country Code: ', this.country_code);
  }
}


const Child = function(father_name, mother_name,city_name, name, age, country_name, country_code) {
  Parent.call(this,father_name,  mother_name, city_name);
  Country.call(this, country_name,country_code);
  this.name = name;
  this.age = age;

  this.printChildDetails = ()=&amp;gt;{
      this.printParentDetails();
      this.printCountryDetails();
      console.log('Child name is: ', this.name);
      console.log('Child age is: ', this.age);
  }
}

Child.prototype = Object.create(Parent.prototype);
Child.prototype = Object.create(Country.prototype);
Child.prototype.constructor = Child;


const child_1 = new Child('Jonny', 'Jolly', 'Washington', 'Jin', 18, 'US', '+1');
const child_2 = new Child('Ram', 'Sham', 'Mumbai', 'Jadu', 21, 'India', '+91');

child_1.printChildDetails();
child_2.printChildDetails();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Using ES6 class
&lt;/h3&gt;

&lt;p&gt;JavaScript class are not pure class like OOPs. JavaScript class does not support multiple inheritance and hybrid inheritance. To implement multiple inheritance, we need to do some JavaScript coding trick. We will build the same example used in above using multiple inheritance concept.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Parent {
  constructor(father_name, mother_name, city_name) {
    this.father_name = father_name;
    this.mother_name = mother_name;
    this.city_name = city_name;
  }

  printParentDetails(){
    console.log('Father Name: ', this.father_name);
    console.log('Mother Name: ', this.mother_name);
    console.log('They live in: ', this.city_name)
  }
}

class Country {
  constructor(country_name, country_code) {
    this.country_name = country_name;
    this.country_code = country_code;
  }

  printCountryDetails() {
    console.log('Country Name: ', this.country_name);
    console.log('Country Code: ', this.country_code);
  }
}


class Child {
  constructor(father_name, mother_name,city_name, name, age, country_name, country_code) {
    extendClass(this, new Parent(father_name, mother_name,city_name));
    extendClass(this, new Country(country_name, country_code));
    this.name = name;
    this.age = age;
  }

  printChildDetails(){
      this.printParentDetails();
      console.log('Child name is: ', this.name);
      console.log('Child age is: ', this.age)
  }
}

function extendClass(child, parent) {
  for(let key in parent){
    child[key] = parent[key]
  }
  Reflect.ownKeys(Reflect.getPrototypeOf(parent)).filter(d=&amp;gt; d!= 'constructor').map(fun=&amp;gt;{if(!child[fun]) {child[fun] = parent.__proto__[fun].bind(child);}});
}


const child_1 = new Child('Jonny', 'Jolly', 'New York', 'Jin', 18);
const child_2 = new Child('Ram', 'Sham', 'Mumbai', 'Jadu', 21);

child_1.printChildDetails();
child_2.printChildDetails();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;extendClass(this, new Parent(father_name, mother_name,city_name))&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This extendClass will bind our &lt;strong&gt;Parent class into Child class&lt;/strong&gt;. It will accept two parameter, first one will be current object means &lt;strong&gt;Child class&lt;/strong&gt; and second one will be instance of &lt;strong&gt;Parent class&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;for(let key in parent)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Loop over all the members of &lt;strong&gt;Parent class **and bind them into **Child Class&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reflect.getPrototypeOf(parent)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It will return a prototype object of the parent class, means all the member functions of the parent class.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reflect.ownKeys(Reflect.getPrototypeOf(parent))&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Retrieve all the functions name from prototype object.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;filter(d=&amp;gt; d!= 'constructor').map(fun=&amp;gt;{if(!child[fun]) {child[fun] = parent.&lt;strong&gt;proto&lt;/strong&gt;[fun].bind(child);}})&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Assign prototype of the** Parent class** to the child class, except *&lt;em&gt;Parent class Constructor&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For full code&lt;/strong&gt;  &lt;a href="https://gist.github.com/bapinmalakar/b7778a78ae7b1d13ab38462af457690f"&gt;&lt;strong&gt;click here&lt;/strong&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;So finally we implement inheritance using both prototype(ES5) and class(ES6). Incase of any query comment box are always open for you and its also free😄😄✌️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qwEkvIGl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572542963871/3fU5TAit_.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qwEkvIGl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1572542963871/3fU5TAit_.gif" alt="giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>es6</category>
      <category>javascript</category>
      <category>class</category>
      <category>prototype</category>
    </item>
  </channel>
</rss>
