Javascript Prototype inheritance Explained ( tutorial Part1)




Understanding Prototypal inheritance in JavaScript.

_ What is constructor in javaScript.
– How to add properties to prototype.
– How to create classes
_ ECMA6, ECMA2015
– The root object in javascript

Keywords: javascript prototype , techsithtube , techsith, js prototype, jquery prototype, inheritance, constructor, code example, tutorial, prototype property, prototype pattern , what is prototype, how to use prototype, javascript prototype explained, prototype object, prototype chain, advance javascript tutorial , javascript object oriented programming, pure javascript , prototypal inheritance,

Original source


34 responses to “Javascript Prototype inheritance Explained ( tutorial Part1)”

  1. You are my favorite teacher on internet ! thank you very much for your tutos i learned a lot ! I have one question maybe you could explain to me. What is the difference between new and object.create and what is the better practice ?

  2. without using prototype

    var x =function(j){
    this.a = 0;
    this.j = j;
    }

    var total1 = new x(1);
    var total2 = new x(20);

    console.log(total1.j);
    console.log(total2.j);

    ——————————————————————–
     can you please explain me what is the difference between this and

    with prototype

     var x =function(j){
    this.a = 0;
    this.j = j;

    }

    x.prototype.getJ=function(){
    return this.j;
    }

    var total1 = new x(1);
    var total2 = new x(20);

    console.log(total1.getJ());
    console.log(total2.getJ());

    without using the prototype still its showing the same output then what is the prototype role

  3. Hi, first off, thanks for this super awesome tutorial. Have you consider teaching at Udemy? I bought a lesson on Udemy on this topic but had to come here to thoroughly understand it. Wow, you are a fantastic teacher and would buy your lessons…Thanks again..!

  4. Man! your tutorials are the most simple explained!
    It seems like the other youtube channels are trying to make it so hard to lead coding.
    Keep up the good work!!

Leave a Reply