ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Prototype Inheritance in JavaScript (Hindi)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2018
  • Prototype Inheritance in JavaScript
    You can find out our HTML Complete Video tutorials :
    goo.gl/O254f9
    CSS Complete Video Tutorial Playlist:
    goo.gl/On2Bh1
    Feel free to share this video
    JavaScript Complete Video Tutorial Playlist
    goo.gl/A517jQ
    Check Out Our Other Playlists:
    / geekyshow1
    SUBSCRIBE to Learn Programming Language !
    goo.gl/glkZMr
    Learn more about subject:
    www.geekyshows....
    __________________________________________________________
    If you found this video valuable, give it a like.
    If you know someone who needs to see it, share it.
    If you have questions ask below in comment section.
    Add it to a playlist if you want to watch it later.
    ___________________________________________________________
    T A L K W I T H M E !
    Business Email: contact@geekyshows.com
    TH-cam Channel: / geekyshow1
    Facebook: / geekyshow
    Twitter: / geekyshow1
    Google Plus: plus.google.co...
    Website: www.geekyshows....
    ___________________________________________________________
    Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO :)
    ___________________________________________________________

ความคิดเห็น • 80

  • @rishavsaxena1437
    @rishavsaxena1437 ปีที่แล้ว +2

    2 month ago i watched full tutorial of js from a youtube channel named as CodeWithHarry , literally many times i tried to understand prototype inheritance but i did not get and i avoid geeky shows tutorial coz of it's too old we should learn from new content but i am wrong @geekyShow your content #oldIsgold i get in only in a single video really appriciatable thanks for it. advice for evryone nothing is old man.....

  • @hassanfarooqstar7427
    @hassanfarooqstar7427 2 ปีที่แล้ว +1

    Love from Pakistan. love u man. i was struggling with this...actually i am taking lecture from Code with Mosh.
    but he didnt use Graphical explanation like u did. i am clear now,,,,about many things. Thank You

  • @kiranpisal5263
    @kiranpisal5263 4 ปีที่แล้ว +1

    Very nice explanation

  • @SyedAounAbbasZaidi
    @SyedAounAbbasZaidi ปีที่แล้ว

    bohat aala brother.... kya baat h

  • @pankajjoshi547
    @pankajjoshi547 4 ปีที่แล้ว +2

    why we reset constructor.....if we dont reset this than what causes are??

  • @rohitthakur6397
    @rohitthakur6397 2 ปีที่แล้ว +1

    We are not inheriting the prototype of Mobile class in Samsung class but we are exchanging the Samsung class's prototype with Mobile class's prototype. Is it right or wrong sir??

    • @nimeshghimire6749
      @nimeshghimire6749 ปีที่แล้ว

      after spending one hour in console , i got this point.

  • @SartajKhan-tn3hj
    @SartajKhan-tn3hj 3 ปีที่แล้ว +1

    very well explained. Just made my notes. thanks dear

  • @juniorWeb247
    @juniorWeb247 2 ปีที่แล้ว

    best best best best best best ever lecture seen on youtube. Thanku so much brother, God bless you

    • @geekyshows
      @geekyshows  2 ปีที่แล้ว

      Thanks and welcome

  • @PROTECHRAHUL
    @PROTECHRAHUL 2 ปีที่แล้ว +2

    Really mam js is tough.

    • @sandeeppansari2944
      @sandeeppansari2944 2 ปีที่แล้ว

      bahut tough........ yaha dimaag ka dahi ho rakha h

  • @jade7945
    @jade7945 4 ปีที่แล้ว +2

    you explained prototype so well,i mean like wow ,aap plz aur videos bnao ,in react and angular ,prototype is clear now .thankyou so much .

    • @geekyshows
      @geekyshows  4 ปีที่แล้ว

      You can follow our Playlist Tab for other Courses :- th-cam.com/users/GeekyShow1playlists
      React JS dekhne k liye iss link ko follow kijiye th-cam.com/play/PLbGui_ZYuhignjLLXTJWkRJKN-SgAqClL.html

  • @dreamerb1
    @dreamerb1 2 ปีที่แล้ว

    concept clear thank you sir

  • @rajangupta1554
    @rajangupta1554 ปีที่แล้ว

    Thanks you sir yours explanation superb iam fan of you ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @marathi_manus467
    @marathi_manus467 2 ปีที่แล้ว +1

    Which is better framework for JS, react.js or jquery????

    • @mohitkashyap6379
      @mohitkashyap6379 ปีที่แล้ว

      react aur jquery dono alag hai, pahle iye to jaan lo ki react aur jquery hai kya!

  • @user-kn1gt7uv3v
    @user-kn1gt7uv3v 4 หลายเดือนก่อน

    Here the Object. create() function creates an object of the type that we passed in it as an argument. so with that the __proto__ property of the samsung.prototype object will point to the object. prototype only instead of that mobile.prototype object and because of that reason we only need to reset the constructor property of the Samsung.prototype object.

  • @sapanabharambe9841
    @sapanabharambe9841 2 ปีที่แล้ว

    Excellent 🙏

  • @yogeshsharma7741
    @yogeshsharma7741 4 ปีที่แล้ว +1

    Sir, please make short video or make two videos of one topic

  • @nimeshghimire6749
    @nimeshghimire6749 ปีที่แล้ว

    To reach to end for both constructors, if we inherit prototype from mobile to samsung
    mobile = mobile.prototype.__proto__.__proto__
    samsung = samsung.prototype.__proto__.proto__.proto__
    and if dont set samsung.prototype.constructor = samsung then we try the reverse method from prototype to constructor, it will still point to mobile() because of inheritance. which is in fact not logically correct.

  • @funnyise5441
    @funnyise5441 3 ปีที่แล้ว

    Suscribe kar diye concept clear kar diya

  • @IMTIAZVKB
    @IMTIAZVKB 3 ปีที่แล้ว

    Good explanation

  • @abhishekdubey2328
    @abhishekdubey2328 4 ปีที่แล้ว +1

    Your video lecture is very good, but i have a doubt. suppose we pass parameter in in parent function and create object of child then how we call parent by using child object please clear it. Thank You.

  • @jenasusil6
    @jenasusil6 5 ปีที่แล้ว +1

    you are a superb teacher.....

  • @shivakarthi2261
    @shivakarthi2261 6 หลายเดือนก่อน

    Why we resetting? Pls explain.
    * Even if we write only prototype inheritance code then also it runs d code.
    But why we should write that reset code ? Pls explain. Thank you.

  • @rohitthakur6397
    @rohitthakur6397 2 ปีที่แล้ว

    We can inherit the properties and prototype individually.

  • @anaghasalvi8364
    @anaghasalvi8364 4 ปีที่แล้ว +1

    Prototype explained so well!Thank you sir.

  • @navyamahajan5434
    @navyamahajan5434 4 ปีที่แล้ว +1

    Explained so well....thanku sir👍

  • @iamdanyaal
    @iamdanyaal 2 ปีที่แล้ว

    Thank You Sir

  • @RiteshSingh-xb9oy
    @RiteshSingh-xb9oy 4 ปีที่แล้ว +1

    why we reset constructer bro pls explain?

  • @rohitkuwar4011
    @rohitkuwar4011 4 ปีที่แล้ว

    You are best best best!!!🙌🙌🙌🙌🙌🙌
    Prototype jaisi complicated concept ko itni aasani samja diya.

  • @syedularif
    @syedularif 5 ปีที่แล้ว +1

    Hi Can u plz help me on this, prototype inheritance is not working

  • @user-gg5nh1mf6l
    @user-gg5nh1mf6l 5 ปีที่แล้ว +9

    why should we clear this? it's not clear to me.
    Samsung.prototype.constructor = Samsung
    would you please explain this code?

    • @pankajjoshi547
      @pankajjoshi547 4 ปีที่แล้ว

      And also say why we reset constructor.....if we dont reset this than what causes are??

  • @manojgurung4418
    @manojgurung4418 4 ปีที่แล้ว

    great explanation thank u sir

  • @rahul.sarkar
    @rahul.sarkar 4 ปีที่แล้ว

    This channel is a hidden gem!! 💙

  • @muhammadawaisalamkhan9265
    @muhammadawaisalamkhan9265 4 ปีที่แล้ว

    one of the best javaScript tutorials

  • @DeepakSharma-jt8tl
    @DeepakSharma-jt8tl 4 ปีที่แล้ว

    Sir apne jo new object m create kiya h aur bta hain k, m.b acess nahi hoga, but m kar pa raha hu. it showing the value, not undefined. Please tell me
    i am use this code:
    {var Mobile =function(){
    this.a=10;}
    Mobile.prototype.z=40;
    var x= new Mobile();
    }
    {var Samsung= function(){Mobile.call(this);
    this.b= 20;}
    Samsung.prototype= Object.create(Mobile.prototype);
    Samsung.prototype.p=40;
    var y= new Samsung();
    var w= new Samsung();
    document.write(w.a + "");
    document.write(w.b + "");
    document.write(w.z + "");
    }

  • @shashwatgupta5716
    @shashwatgupta5716 4 ปีที่แล้ว

    very nice explained

  • @kushaalrana
    @kushaalrana 4 ปีที่แล้ว

    Explanation is too Good Thank you👌🙏

  • @akashchauhan4609
    @akashchauhan4609 4 ปีที่แล้ว

    Nice thanks sir.

  • @AlanSchooll
    @AlanSchooll 3 ปีที่แล้ว +1

    most underrated channel

  • @himeshmaurya8295
    @himeshmaurya8295 2 ปีที่แล้ว +1

    sir ko sayed Samsung.prototype.__proto__=Object.create(Mobile.prototype); ye likhna chaiye tha may be

  • @sushmasharma7385
    @sushmasharma7385 4 ปีที่แล้ว +1

    Mobile object me this.a to prototype property nhi h phir bhi access ho rha h. Jabki aapne kha tha ki sirf prototype property aur methods Hi inherit ho sakte h

    • @srijithview
      @srijithview 4 ปีที่แล้ว +1

      he has used call method and not oblect.create method. object.create method is used to inherit the prototype

    • @kirankamath5891
      @kirankamath5891 4 ปีที่แล้ว +1

      usne Mobile.call(this) use kiya hai jo inherit kar rha hai a ko

  • @allanimeworld2898
    @allanimeworld2898 3 ปีที่แล้ว

    Its level is overpaid level
    Hats off

  • @gopala.n5442
    @gopala.n5442 5 ปีที่แล้ว

    Well explained buddy

  • @Travelmoments
    @Travelmoments 4 ปีที่แล้ว

    NIce explanation..

  • @AmirHamza-pg8vi
    @AmirHamza-pg8vi 4 ปีที่แล้ว

    Sir (function($, H, window){ block statement}(jQuery, themeHeader, window)); iska motlab keya hay ?

    • @geekyshows
      @geekyshows  4 ปีที่แล้ว

      Watch this th-cam.com/video/pjo0DSuHQzc/w-d-xo.html

  • @susheelyadav6143
    @susheelyadav6143 6 ปีที่แล้ว

    Please make more video on javascript oops.
    Please cover all advance concept.
    Because.
    I had study prototype, inheritance from many websites( like w3, mozilla) and books but could not get it.
    But your strategy of teaching is awsome now i clearly inderstood how prototype works what how to inherite it.

  • @gaurvisrivastava3698
    @gaurvisrivastava3698 3 ปีที่แล้ว

    Please share video on event loop.

  • @arvindsinha1566
    @arvindsinha1566 4 ปีที่แล้ว

    Nice explanation :)

  • @techcsansar
    @techcsansar 4 ปีที่แล้ว

    awesome tutorial...

  • @deleater
    @deleater 5 ปีที่แล้ว

    Ek number samjhaya bhai! Bas ek question, kya Prototype wali functionality sabhi browsers me available hai ?

    • @geekyshows
      @geekyshows  5 ปีที่แล้ว +1

      Yes

    • @deleater
      @deleater 5 ปีที่แล้ว

      @@geekyshows , thank you sir.

    • @aryathegreatengineer5215
      @aryathegreatengineer5215 5 ปีที่แล้ว

      @@geekyshowsbhai pichhle ek saal se 100 ke karib comments kar chuka hu pls quick sort or merge sort per ek video bana dijiye pls pls....pls ...bhai pls.

    • @detector_aryan
      @detector_aryan 3 ปีที่แล้ว

      @@aryathegreatengineer5215 mysirg for sorting algorithm

  • @rajadastidar3765
    @rajadastidar3765 3 ปีที่แล้ว

    cool

  • @mohdkamran530
    @mohdkamran530 3 ปีที่แล้ว

    a couple of questions.
    1. Why didn't we wrote:: this.z = 30 inside Mobile constructor instead of Mobile.Prototype.z = 30
    2. Why can't we do this:: Mobile.z = 30 if functions are also objects, and access z inside Samsung Object.
    3. Can we do this: Samsung.Prototype = Mobile.Prototype. If not, then why.

    • @himeshmaurya8295
      @himeshmaurya8295 2 ปีที่แล้ว +1

      sir ko sayed Samsung.prototype.__proto__=Object.create(Mobile.prototype); ye likhna chaiye tha may be

    • @hell_robo
      @hell_robo 7 หลายเดือนก่อน

      brother i had done same thing...
      Child.prototype = Base.prototype;
      console.log(Child.prototype.constructor);
      console.log("prototype : " + ch.__proto__.childVarPt);
      and the result is insane ... simple technique than sir have taught to us
      /*
      this is just a complete task which i have started to understand some concept by my self...
      because these questions are arises to my mind during learning by video and i have solved those questions and result is insane...
      function Base() {
      this.baseVar = 10;
      }
      function Child() {
      this.childVar = 20;
      }
      let bs = new Base();
      let ch = new Child();
      console.log("constructor : " + bs.baseVar);
      console.log("constructor : " + ch.childVar);
      Base.prototype.baseVarPt = 10;
      Child.prototype.childVarPt = 20;
      console.log("prototype : " + bs.__proto__.baseVarPt);
      console.log("prototype : " + ch.__proto__.childVarPt);
      console.log("Accessing super's from child's....");
      Child.prototype = Base.prototype;
      console.log(Child.prototype.constructor);
      console.log("prototype : " + ch.__proto__.childVarPt);
      /*
      ch.__proto__ = bs.__proto__; //setting base prototype link OR connection to the child prototype..
      console.log(ch.__proto__.baseVarPt);
      console.log(ch.__proto__.constructor);
      */
      */
      some comment issues due to youtube textbox but solve by your own...

    • @hell_robo
      @hell_robo 7 หลายเดือนก่อน

      write this code also in the program above for your 1st question...
      -------------------------------------------------------------------------------------------------------
      console.log("baseVar" in Base.prototype);
      console.log("baseVarPt" in Base.prototype);

  • @iUmerFarooq
    @iUmerFarooq 4 ปีที่แล้ว

    Thank You

  • @MUKESHYADAV-lf8cv
    @MUKESHYADAV-lf8cv 3 ปีที่แล้ว

    why can't we do Samsung.prototype = Mobile.prototype ??

  • @captainsparrow9040
    @captainsparrow9040 6 ปีที่แล้ว +1

    Sir jquery kb start kr rhe ho
    And Java script ki ye Playlist kb khatam hogi

  • @rajatgalav6734
    @rajatgalav6734 3 ปีที่แล้ว

    Let person = { name: "geek" } is this also a constructor?

    • @adityarocker7205
      @adityarocker7205 3 ปีที่แล้ว +2

      No it is not a constructor....
      function Person(){
      this.name = "geek" ;
      }
      ☝️ This Is Constructor

    • @adityarocker7205
      @adityarocker7205 3 ปีที่แล้ว +2

      This Is Only A simple Object....

  • @mohammadkaisam4099
    @mohammadkaisam4099 5 ปีที่แล้ว

    mobile.call() me mObile k parameterss me argument de tw access ni hoga kia

  • @BittuKumar_Web
    @BittuKumar_Web 6 หลายเดือนก่อน

    bhai hmko sikhna to yhi hai jo apne video me cover kiya hai. lekin smjh nhi aaya thk se,

    • @geekyshows
      @geekyshows  6 หลายเดือนก่อน

      Its a difficult topic watch one more time

  • @kuldipsathvara5621
    @kuldipsathvara5621 4 ปีที่แล้ว

    Constructor reset kem karvu pade che?

  • @urbanstreetart9776
    @urbanstreetart9776 3 ปีที่แล้ว

    Sabse ghatiya tutorial ...sala jab es6 aa hi gaya to kyu prototype ki asi taise kar raha hai jo cheez ek video m bata sakta hai vo content badane k liye ..5 -6 video m batat hai .. bhai tune to dimag kharab kar diya sach me