Magic of Prototype in javascript | chai aur

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Visit chaicode.com for all related materials, community help, source code etc.
    #javascript #hindi
    Sara code yaha milta h
    github.com/hit...
    Discord pe yaha paaye jaate h:
    hitesh.ai/discord
    Instagram pe yaha paaye jaate h:
    / hiteshchoudharyofficial

Комментарии • 594

  • @hemantsuthar6904
    @hemantsuthar6904 2 месяца назад +33

    Basically the summary of the video is :
    1) If you want that a method should be accessible or present in all objects in javascript (for ex: arrays, strings, functions,etc) then you can set your own method in the top level Object (because everything is an object in javascript) by using | Object.prototype.{method name} = function(){} | , after doing this you will have the access of your {method.name} from all objects for ex: every array that you declare, every string that you declare and so on.
    2) But lets say if you want a certain method that should be accessible only on a certain object ( for example : (this is used in the video) you want a trueLength(){this method returns the true length of an array by trimming all the whitespaces} method to accessed on all String declarations , then you can be like | String.prototype.trueLength = function(){ code that does trimming and return length } | and this will be accessible on all strings .
    3) this keyword in javascript refers to the current context of who is calling . matlab this boleto jisne bulaya . example: if you say | "hemant ".trueLength() | then how will the trueLength() method knows that on whom it have to perform . so we use this in the trueLength() function definition so it will automatically take the context of by whom the method is callled , boleto jisne bulaya uska kaam hoga.....
    if any one feels that i have included some wrong info in this comment then feel free to reply about the same.

  • @vikasvarma9462
    @vikasvarma9462 Год назад +135

    0:00 - 27:00 object and new oprater features
    27:00 prototype

  • @pococopo2538
    @pococopo2538 8 месяцев назад +12

    shuru shuru m chize upr se jaari thi... fer ek bar bich m chhodke dubara se start kiya tb acche se smjh aagya.. Thank You Sir

  • @thecalgarians4597
    @thecalgarians4597 5 месяцев назад +10

    I never 'knew' what all happened underneath 'new'.
    Mind blowing detailing explaiend.

  • @shreyakolekar4059
    @shreyakolekar4059 10 месяцев назад +27

    Thank you Hitesh Sir for this amazing explanation of prototypes. Covers everything right from prototypical inheritance to defining own prototype methods for various objects.
    I love how you teach everything starting from old coding practices to how it has been evolved today.
    For anyone learning JavaScript from scratch and aiming to become a software developer, this is the go-to series!!

    • @learnwithez
      @learnwithez 8 месяцев назад

      Hello mam can i ask you something?im pursing bsc it , after that can i get a job as fresher ik frontend in web development

  • @bhaimohsin
    @bhaimohsin 7 месяцев назад +8

    This playlist is full of detailed information. It is better than alot of PAID courses out there.
    Thank you Software Expert Hitesh Choudhary Sir!

  • @aksh1453
    @aksh1453 Год назад +55

    I am an English major student pursuing MERN stack following my passion. You contents are so helpful to understand things in details and it's work behind the scene . Thank you so much. You are affecting many students like me. ❤

    • @DashinDanish
      @DashinDanish Год назад +5

      same bro! I am an Arts grad. Recently jumped into learning MERN stack. I'd love to connect with you in order to learn together.

    • @viralvideos6200
      @viralvideos6200 11 месяцев назад +1

      Same here

    • @esportsgapshap3149
      @esportsgapshap3149 11 месяцев назад +1

      hey me here also a English Grad !

    • @kalsotraaditya98
      @kalsotraaditya98 6 месяцев назад

      ​@@DashinDanishbro whats your update?

    • @DashinDanish
      @DashinDanish 6 месяцев назад +1

      @@kalsotraaditya98 Done with frontend almost.

  • @ironmanback
    @ironmanback 7 месяцев назад +26

    Ab muje chakkar ane laga hai😂

  • @Vikram_Singh_CS
    @Vikram_Singh_CS Год назад +45

    Mark my words, In coming years this video will be one of the reason of making this playlist best present JS playlist on RUclips.
    -धन्यवाद हितेश

  • @itumandal22
    @itumandal22 Год назад +8

    crystal and clear explanation of this context. this means ''jis ne v bulaya ho'. All thanks to Hitesh sir. 😊

  • @avneetyadav474
    @avneetyadav474 5 месяцев назад +2

    Sir, this is the first time I could understood about prototype. Thanks

  • @DashinDanish
    @DashinDanish Год назад +17

    @ 27:00 begins prototypal (inheritance)
    !

  • @kunalpandey3579
    @kunalpandey3579 Месяц назад

    At first I didn't understand what he was trying to explain about the prototype but then I rewatched the whole video. After that everything became crystal clear. This is the best explanation of a prototype you can ever imagine.

  • @prateek5668
    @prateek5668 Год назад +6

    Best teaching style....jis ka mtlb this

  • @user-gm3uk3dp9q
    @user-gm3uk3dp9q 8 месяцев назад +4

    The portion where we added custom function to all objects was really cool

  • @Leo-gaming-le
    @Leo-gaming-le 4 месяца назад +1

    this prototype video is really amazing i learn so so much from this video specially jis tarah se aap ne samjaya. muje bohot lambe time se prototype samaj nhi aarha tha specially "this" and "new" key word but finally....... finally me acche se samaj gya thank you so so much sir. ❤❤❤ sir aap ese hi video bnate rhe.

  • @thecalgarians4597
    @thecalgarians4597 4 месяца назад +4

    Just watched till the end now and I'm speechless and awe struck.
    Nowhere on the planet I assume had anyone ever taught JS in this depth.

  • @shoaibhasan4026
    @shoaibhasan4026 Год назад +5

    All my topics about functional constructor , new keyword , constructor function, prototypal inheritance and this keyword are crystal clear now . Great video Sir No paid courses teaches like you in depth . Thank you so much sir ❤❤❤

  • @HeyIMSomnath
    @HeyIMSomnath 4 месяца назад +3

    Itna depth aaj tak kisi JavaScript course me nhi hai.

  • @Hitesh.17
    @Hitesh.17 8 месяцев назад +3

    How easily you made me clear about new and this keyword with the prototype concept..... you really nailed it 🔥

  • @shadikhusain1216
    @shadikhusain1216 Год назад +1

    Thank you @Hitesh Sir. ❤ esi tarah video aayenge aur aese js topic milte rahenge to js mai mastery sach mai krr jayenge.

  • @RaviYadav_Dev
    @RaviYadav_Dev 7 месяцев назад +1

    For people who are coming from Kotlin or similar languages, prototype function is a extension function for existing classes

  • @mohsinsiddique5158
    @mohsinsiddique5158 Месяц назад

    25:55 In the OOP 42 class (at the 26:00 mark), it was explained that whether or not you use return this, you still get the object.

  • @kartikeytiwari9950
    @kartikeytiwari9950 11 месяцев назад +11

    0:00 intro
    2:50 start
    7:10 diagram
    9:20 Function as object
    13:00 this
    20:50 new
    23:00 Notes
    27:00 prototype
    38:00 Inheritance
    42:00 modern syntax of inheritance

    • @apatel176
      @apatel176 11 месяцев назад +1

      Anyone can help jab hum function ki jagah par Arrow function use karte hai toh score ki value undefined kyu batata hai ???

    • @GamingWithParamYT
      @GamingWithParamYT 11 месяцев назад +1

      @@apatel176 brother arrow function me aap new keyword use nhi kar sakte basically constructor function nhi hn arrow func normal func se hi constructor func bnta hn thats why arrow func ye cheeze support nhi karta

  • @AnshuKushwaha-xz8di
    @AnshuKushwaha-xz8di Месяц назад

    guru ji pehle to maza aa rha tha ab sir dard hone lagata h . bhot complex hote ja rha hai but aap in the end easy kr dete hai,

  • @lokehirl
    @lokehirl 11 месяцев назад +3

    Information rich and information heavy video, took a long to digest and understand, but after few replays.

  • @abdul_rab01
    @abdul_rab01 24 дня назад

    Thanks Sir for this Masterpiece series !! What an explanation on prototypes , mindblowing! And the way you teach "new" keyword, Hatsoff to you sir!

  • @uddhavraj9791
    @uddhavraj9791 9 месяцев назад +1

    Thank you sooo mch sir your way of teaching is sooo good. now i understood what is happening behind the scene. thnq soo mch for this fantastic explaination

  • @pravinmaane
    @pravinmaane 3 месяца назад +3

    what a informative video. Great work sir 👌

  • @HarshGupta-if2xg
    @HarshGupta-if2xg Год назад +3

    I guess this is the first lecture from the whole javascript series which goes above my head ........................but loved it. Have to watch one more time but truely guiene content keep making indept video like that.
    Thank you so much.

    • @Manojsingh-cp9eq
      @Manojsingh-cp9eq 11 месяцев назад

      same

    • @OmkeshJadhav
      @OmkeshJadhav 6 месяцев назад

      Same. Came to comment section just to check ki mere jaisa aur koi hai kya ya mai akela hi aisa hu

  • @MRINFO-cc8yn
    @MRINFO-cc8yn 2 месяца назад

    This video worth millions of views, that's the most important video of the whole series, thank sir I got the entire foundational concept of JavaScript

  • @shubhtripathi4265
    @shubhtripathi4265 3 месяца назад +1

    Thankyou sir for sharing quality knowledge 😁

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt Год назад +1

    This is amazing most simply, beautifully explanation of Prototype.
    Thank you so much Sirji, aapka explanation bahut Dhamakedar, kamaal ka hai, maja aagaya 😀
    Aap world k Best Javascript teacher hai 😊

  • @niharikabhardwaj4598
    @niharikabhardwaj4598 4 месяца назад

    This is an excellent explanation, sir. I'm viewing for the first time, and I understand the majority of what I'm seeing.

    • @ExploreSciFi
      @ExploreSciFi 4 месяца назад

      good after some days you gonna understand even without inner concepts watching tutorials
      😂 kxch ziyada to nai hogiya

  • @sanantakumarrath1775
    @sanantakumarrath1775 Год назад +1

    maja aagaya sir , lekin ye mera last point tha ise upar jate toh sab mera sar ke upar se jata , Lekin ye video bahat helpfull tha mujhe this and prototype words se dar lag tat tha ,lekin ye video dekhne ke bad confidence level badh gaya

  • @singhkr
    @singhkr 10 месяцев назад +1

    what a amazing lectures best lecture available on youtube or any other platform

  • @nature443
    @nature443 10 месяцев назад +1

    Your Teaching clears most of thing ,Thank you,

  • @junaidshaikh952
    @junaidshaikh952 11 месяцев назад +3

    Perfect In dept video that I needed. Many thanks explaining in such a simple way.

  • @akshayjain2777
    @akshayjain2777 Год назад +3

    Thanks sir 🎉❤ best series in of js with such a deep content in RUclips

  • @sureshbhatt363
    @sureshbhatt363 3 месяца назад +1

    Thank you once again Hitesh bhai

  • @kaushalkishor143
    @kaushalkishor143 6 месяцев назад +1

    Thanks sir. your way of explanation is very nice. this video is useful for me.

  • @BitFire007
    @BitFire007 6 месяцев назад +1

    "Chai aur Code, you're the hero of my JavaScript learning story. Your tutorials are unmatched!"

  • @GamingWithParamYT
    @GamingWithParamYT 11 месяцев назад +3

    Sir You are literally doing great Helping many students who can't afford expensive resources ❤❤❤❤

  • @avinashjha7848
    @avinashjha7848 3 месяца назад +1

    Awesome Explaination Sir

  • @hamzasajid7973
    @hamzasajid7973 4 месяца назад +1

    interesting examples and very well explained

  • @kundandubey2401
    @kundandubey2401 5 месяцев назад +1

    thank you sir for detail explanation😊

  • @WebDeveloper-wt5tz
    @WebDeveloper-wt5tz 7 месяцев назад +1

    I am from Pakistan. By watching this series I decided to accept you as my teacher. Thank you for such an amazing series!

  • @SachinYadav-eh7vg
    @SachinYadav-eh7vg Год назад +2

    This JS series is one of the best
    Thank You Hitesh 🧑‍💻

  • @kumarsagar34
    @kumarsagar34 11 месяцев назад +1

    this is pure gold, thank you very much for this video, mind blown, what a joke it was when i thought i knew javascript basics, thank you for this, please keep on making these valuable content

  • @nehabansal370
    @nehabansal370 6 месяцев назад

    Although I am an experienced developer, but I was always confused about the covered topics. Thankyou so much Sir, for explaining it in-depth. All these topics are finally clear.

  • @divasbhadani9225
    @divasbhadani9225 Год назад +1

    one of the best tutorial on youtube.
    Thank You Sir 🙏

  • @hemantkumaryadav8006
    @hemantkumaryadav8006 Месяц назад

    atleast 2 baar to dekhni hi padegi ye video tabhi clear hogya 👌

  • @tech_channel110
    @tech_channel110 Год назад +2

    behtareen or shandar lecture
    hitesh sir ki jay ho

  • @msdhaliwal
    @msdhaliwal 2 месяца назад

    this is the one of the best videos of your channel 🔥

  • @ritvikanand109
    @ritvikanand109 Год назад +5

    सर आप का बहुत बहुत धन्यवाद।❤❤

  • @imsiddhants_official
    @imsiddhants_official 8 месяцев назад +2

    Really nice session😃 much appreciated!

  • @viditgoel2909
    @viditgoel2909 Год назад +1

    This lesson had one of the best explanations in the whole series, just went through it and tried to solve the goal of adding the trueLength method to String by myself, took some effort and some help from mdn docs but now I feel confident about prototypes, and adding custom method and properties to them. thanks a lot, Sir.

  • @animesh1945
    @animesh1945 Месяц назад

    Chai pe charcha to ise kehte hain. This video is the best in this series. I Love this Charcha❤❤❤

  • @BioChemAcademy
    @BioChemAcademy 4 месяца назад

    just for comment (Mark my words, In coming years this video will be one of the reason of making this playlist best present JS playlist on RUclips. )

  • @manuvashisht9376
    @manuvashisht9376 Месяц назад

    00:02 Prototype in JavaScript is a unique and interesting concept.
    01:50 Understanding the prototype behavior in JavaScript.
    05:28 Understanding prototype inheritance in JavaScript
    07:19 Understanding objects and prototypes in JavaScript
    11:05 Functions and objects in JavaScript share properties and behavior
    12:56 Understanding the use of 'this' in JavaScript prototypes
    16:46 Using prototype in JavaScript to manage object properties efficiently.
    18:29 Understanding prototype and method creation in JavaScript
    22:03 Understanding the functionality of the 'new' keyword in JavaScript.
    23:38 The new keyword creates linked objects with prototype properties.
    26:54 Understanding the concept of prototypes in JavaScript
    28:37 Implementing true string length property in JavaScript.
    32:25 Prototype helps to add and access properties and methods to objects
    34:27 Understanding the power and properties of prototype objects in JavaScript
    38:08 Teaching support and object properties in JavaScript
    39:53 Accessing properties using Prototypes
    43:18 Accessing and manipulating properties directly in JavaScript
    45:01 Accessing and using the true length property in JavaScript prototypes.

  • @mayank_m_jain_1160
    @mayank_m_jain_1160 11 месяцев назад +1

    Great Video on Prototype.
    Part1 -> 0:00 - 26:38
    Part2 -> 26:38

  • @ashish_more
    @ashish_more 10 месяцев назад +1

    the information giving in this video is very high level , I have watched this video twice to actually understand and realise the importance of the topics taught by Hitesh sir , thank u sir for providing such a quality course .

  • @mandeep542
    @mandeep542 4 месяца назад

    i watched both of the one shot but coming on every video to like them

  • @jast_aryan-13
    @jast_aryan-13 8 месяцев назад

    Sir ji bhhut achi series bnai hai apne or is prototype vale lec se toh bhhut knowledge mili hai 😊

    • @chaiaurcode
      @chaiaurcode  8 месяцев назад

      To share b krdo to aur acha rhega

    • @jast_aryan-13
      @jast_aryan-13 8 месяцев назад

      Jrur sir kre gee

  • @atvmoviedigest
    @atvmoviedigest 5 месяцев назад

    Ye ramayan ka saar bahut hi interesting tha, please continue teaching us in this.style 🤩

  • @nayanbiswas370
    @nayanbiswas370 8 месяцев назад

    jiska matlab this, it was much easier to stick in my thick skull 😎 Thank you Sir... Love from Bangladesh

  • @singhamita
    @singhamita 4 месяца назад

    Thanks alot for creating such a simplified vedios and complete tutorial on internet.

  • @Dev-Phantom
    @Dev-Phantom 5 месяцев назад

    if knowledge is power then you have "superpower" Thanks sir for enlightening us.😍

  • @subhranshu_sekhar
    @subhranshu_sekhar Месяц назад

    Thanks sir. Prototype crystal clear 😊

  • @swapnildutta2104
    @swapnildutta2104 6 месяцев назад

    0:00 - 27:00 (New keyword, Objects, this)
    27:01 - Prototype and prototypal inheritance
    and most imp part Jis === this ;

  • @deveshsharma534
    @deveshsharma534 5 месяцев назад +1

    great sir as always. thankyou so much

  • @SarveshKumar-bl9in
    @SarveshKumar-bl9in 11 месяцев назад +1

    This lecture is amazing . thank you so much sir.

  • @soniyaprasad77
    @soniyaprasad77 9 месяцев назад +1

    This ka matlab "Jis" .
    Obeying Hitesh's Sir Order!

  • @SurajKhonde-tl1dk
    @SurajKhonde-tl1dk 8 месяцев назад +1

    jis ne bhi bulaya ham usike hoiye . thank you so much i paid 50,000 rs to learn javascript development i didn't get how to use this but in because of you i understand in free.

  • @SpecialShorts892
    @SpecialShorts892 Год назад

    ye topic PWSKILLS ke course me achhe se clear nhi hua , but yha crystal clear ho gya (pw ke lect me saare example same hai bas wo array , string& function all are passes through Object wala diagram jiske wajah se clear hua ye topic
    )

  • @aryanwolfox6390
    @aryanwolfox6390 7 месяцев назад +1

    Use of new key word for Constructor function and the new operator 0:00-26:00
    Prototype 26:30

  • @tusharsahu2711
    @tusharsahu2711 Год назад +1

    Best JavaScript Course Ever
    Thanks Sir Ji ❤

  • @NOT_TON_Fan
    @NOT_TON_Fan Год назад +2

    Hey all, do not forget to subscribe!

    • @chaiaurcode
      @chaiaurcode  Год назад +2

      Ye h sabse important baat

    • @NOT_TON_Fan
      @NOT_TON_Fan Год назад

      @@chaiaurcode Sir what's next please clear, is it react or CSS. I was also excited about react but now I think that next should be CSS. So that we'll still be on track towards full stack without any jump.

  • @dragononfire7124
    @dragononfire7124 6 месяцев назад

    I was so confused in this concept, now sir you have cleared all my confusions😍.

  • @alhamdulillahcreators03
    @alhamdulillahcreators03 11 месяцев назад

    yr sir pahly kahn thy itnay mazy ki playlist i will shift from flutter to js ye sirf chai and code ki power hy ,becase yahn behand the scen and investigation study ma ki power hy
    😍😍😍😍😍

  • @kaynatkhatib1289
    @kaynatkhatib1289 5 месяцев назад

    30:17 : "Ap b chae rakhiyega sath main kafi kam ayegi" .. Meanwhile me watching this while fasting :P

  • @someshlingwal6103
    @someshlingwal6103 Месяц назад

    Best series for the next 10 year's i guess❤️

  • @parthpitroda35
    @parthpitroda35 7 месяцев назад

    No one else could have explained better than you about behind the scenes of the constructor, prototype and other concepts related to OOP
    Huge fan ❤

  • @barunkumar3276
    @barunkumar3276 11 месяцев назад

    Reached at 22:19. Ye video meel ka patthar sabit hoga. Salute!!

  • @deepanshupatel6006
    @deepanshupatel6006 9 месяцев назад

    This means is jisne bhi
    This --> jisne bhi
    Sir this is my first comment in your channel
    But I learn JavaScript from your channel to starting when you started
    Unfortunately I am not comment anything but the share and much more I done from my side
    To learn my friends as well from you and
    I am in one class in Mumbai but the javascript tutorial is maximum guys watching your video
    And my office people also
    And every one is appreciated to you sir
    😊

  • @abdul_rab01
    @abdul_rab01 24 дня назад

    21:40 😆😆 best dailogue by sir!!

  • @saptathirtachoudhury4158
    @saptathirtachoudhury4158 5 месяцев назад

    Aapka motivation kam hone nahi denge Sir ji

  • @09umerkhalid12
    @09umerkhalid12 18 дней назад

    This playlist is all about
    Legend aur Javascript

  • @jr.devasana
    @jr.devasana 3 месяца назад

    Pata hi nahi chala ki itna time laga. Jaydatar lambi videos me lagta hai bahooot jayda ho gya. Jab cheeje samjh ane lagti hai to time kaha jata pata nhi chalta hai. :)

  • @linux097
    @linux097 8 месяцев назад +1

    0:00 - 27:00 object and new oprater features .
    27:00 prototype.

  • @vimalradadiya5929
    @vimalradadiya5929 5 месяцев назад

    next level explanation for behind the scene working of js

  • @nmithileshkumar1919
    @nmithileshkumar1919 Месяц назад

    What an explanation sir!!! 🙏

  • @user-gq7ff4nt5c
    @user-gq7ff4nt5c 5 месяцев назад

    The guy is making the difference🔥

  • @adilmian554
    @adilmian554 8 месяцев назад

    MashAllah Sir G !
    Kmal kr di ksm sy Thnks sir g for this great efforte for us
    Love from Pakistan Sir g

  • @KaifKhan_001
    @KaifKhan_001 4 месяца назад

    Respected Sir, I have request for you please when you declare any type of array or object of myHeros Kindly make sure to insert indianArmy, Doctors, Lawyers... these type instead of thor and spiderman. Btw Lots of love❤❤❤❤❤❤

  • @Veecast247
    @Veecast247 Год назад +1

    Thank you, sir, for the in-depth js series

  • @Umarfaooqkhan-804
    @Umarfaooqkhan-804 День назад

    0:00 - 27:00 object and new oprater features
    27:00 prototype

  • @NeedToKnow.
    @NeedToKnow. 9 месяцев назад

    speechless, bow down to you sir 🙇‍♂

  • @geekguri_tech
    @geekguri_tech 8 месяцев назад

    Love his way of teaching really great series of JS
    I am learning JS and React side by side from Hitesh sir and I am pleased to be a student of him.

  • @Dev-Phantom
    @Dev-Phantom 8 месяцев назад

    one of the best Lecture and Concept in my life sir ,,the best........