Magic of Prototype in javascript | chai aur

Поділитися
Вставка
  • Опубліковано 21 лип 2023
  • Visit chaicode.com for all related materials, community help, source code etc.
    #javascript #hindi
    Sara code yaha milta h
    github.com/hiteshchoudhary/
    Discord pe yaha paaye jaate h:
    hitesh.ai/discord
    Instagram pe yaha paaye jaate h:
    / hiteshchoudharyofficial
  • Наука та технологія

КОМЕНТАРІ • 556

  • @hemantsuthar6904
    @hemantsuthar6904 Місяць тому +22

    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 Рік тому +122

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

  • @ironmanback
    @ironmanback 6 місяців тому +18

    Ab muje chakkar ane laga hai😂

  • @pococopo2538
    @pococopo2538 7 місяців тому +8

    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

  • @shreyakolekar4059
    @shreyakolekar4059 9 місяців тому +26

    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 6 місяців тому

      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

  • @DashinDanish
    @DashinDanish Рік тому +17

    @ 27:00 begins prototypal (inheritance)
    !

  • @bhaimohsin
    @bhaimohsin 6 місяців тому +7

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

  • @junaidshaikh952
    @junaidshaikh952 10 місяців тому +3

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

  • @thecalgarians4597
    @thecalgarians4597 3 місяці тому +4

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

  • @user-gm3uk3dp9q
    @user-gm3uk3dp9q 7 місяців тому +4

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

  • @avneetyadav474
    @avneetyadav474 3 місяці тому +1

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

  • @Hitesh.17
    @Hitesh.17 6 місяців тому +2

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

  • @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 ❤❤❤

  • @viditgoel2909
    @viditgoel2909 10 місяців тому +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.

  • @kumarsagar34
    @kumarsagar34 10 місяців тому +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

  • @Vikram_Singh_CS
    @Vikram_Singh_CS 10 місяців тому +44

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

  • @singhamita
    @singhamita 2 місяці тому

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

  • @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.

  • @prateek5668
    @prateek5668 Рік тому +5

    Best teaching style....jis ka mtlb this

  • @tech_channel110
    @tech_channel110 10 місяців тому +2

    behtareen or shandar lecture
    hitesh sir ki jay ho

  • @lokehirl
    @lokehirl 10 місяців тому +3

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

  • @AnshuKushwaha-xz8di
    @AnshuKushwaha-xz8di 9 годин тому

    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,

  • @itumandal22
    @itumandal22 11 місяців тому +8

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

  • @Leo-gaming-le
    @Leo-gaming-le 2 місяці тому +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.

  • @singhkr
    @singhkr 8 місяців тому +1

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

  • @pravinmaane
    @pravinmaane Місяць тому +3

    what a informative video. Great work sir 👌

  • @divasbhadani9225
    @divasbhadani9225 11 місяців тому +1

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

  • @MRINFO-cc8yn
    @MRINFO-cc8yn 29 днів тому

    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

  • @deveshsharma534
    @deveshsharma534 4 місяці тому +1

    great sir as always. thankyou so much

  • @uddhavraj9791
    @uddhavraj9791 7 місяців тому +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

  • @SarveshKumar-bl9in
    @SarveshKumar-bl9in 9 місяців тому +1

    This lecture is amazing . thank you so much sir.

  • @GamingWithParamYT
    @GamingWithParamYT 10 місяців тому +3

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

  • @HeyIMSomnath
    @HeyIMSomnath 3 місяці тому +3

    Itna depth aaj tak kisi JavaScript course me nhi hai.

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 11 місяців тому +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 😊

  • @WatchNotchK2S
    @WatchNotchK2S 5 місяців тому

    bhot bhot amazing video sir , ab aur maja aa rha hai js padhne me

  • @nature443
    @nature443 9 місяців тому +1

    Your Teaching clears most of thing ,Thank you,

  • @RaviYadav_Dev
    @RaviYadav_Dev 6 місяців тому +1

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

  • @imsiddhants_official
    @imsiddhants_official 7 місяців тому +2

    Really nice session😃 much appreciated!

  • @mohsinsiddique5158
    @mohsinsiddique5158 7 днів тому

    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.

  • @aksh1453
    @aksh1453 Рік тому +53

    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 Рік тому +4

      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 10 місяців тому

      Same here

    • @esportsgapshap3149
      @esportsgapshap3149 9 місяців тому +1

      hey me here also a English Grad !

    • @kalsotraaditya98
      @kalsotraaditya98 5 місяців тому

      ​@@DashinDanishbro whats your update?

    • @DashinDanish
      @DashinDanish 5 місяців тому +1

      @@kalsotraaditya98 Done with frontend almost.

  • @shubhtripathi4265
    @shubhtripathi4265 2 місяці тому +1

    Thankyou sir for sharing quality knowledge 😁

  • @avinashjha7848
    @avinashjha7848 2 місяці тому +1

    Awesome Explaination Sir

  • @msdhaliwal
    @msdhaliwal Місяць тому

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

  • @sureshbhatt363
    @sureshbhatt363 2 місяці тому +1

    Thank you once again Hitesh bhai

  • @kaushalkishor143
    @kaushalkishor143 5 місяців тому +1

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

  • @nmithileshkumar1919
    @nmithileshkumar1919 12 днів тому

    What an explanation sir!!! 🙏

  • @WebDeveloper-wt5tz
    @WebDeveloper-wt5tz 6 місяців тому +1

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

  • @dokodiaries
    @dokodiaries 7 місяців тому

    Very detailed. Supercalifragilisticexpialidocious. Thank you so much..

  • @hamzasajid7973
    @hamzasajid7973 3 місяці тому +1

    interesting examples and very well explained

  • @YogeshSatishAjilamogaru
    @YogeshSatishAjilamogaru 9 днів тому

    awesome explanation. thank you

  • @Veecast247
    @Veecast247 Рік тому +1

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

  • @mandeep542
    @mandeep542 2 місяці тому

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

  • @akshayjain2777
    @akshayjain2777 Рік тому +3

    Thanks sir 🎉❤ best series in of js with such a deep content in UA-cam

  • @ashish_more
    @ashish_more 9 місяців тому +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 .

  • @ayanbiswas-ct2qv
    @ayanbiswas-ct2qv 11 місяців тому

    so far the best concept I have ever seen in JS

  • @kundandubey2401
    @kundandubey2401 4 місяці тому +1

    thank you sir for detail explanation😊

  • @SachinYadav-eh7vg
    @SachinYadav-eh7vg Рік тому +2

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

  • @user-mo1sy5ck7r
    @user-mo1sy5ck7r 5 місяців тому

    what an amazing lecture, Salute Sir🙏,

  • @NeedToKnow.
    @NeedToKnow. 8 місяців тому

    speechless, bow down to you sir 🙇‍♂

  • @vimalradadiya5929
    @vimalradadiya5929 4 місяці тому

    next level explanation for behind the scene working of js

  • @Dev-Phantom
    @Dev-Phantom 7 місяців тому

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

  • @atvmoviedigest
    @atvmoviedigest 4 місяці тому

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

  • @subhranshu_sekhar
    @subhranshu_sekhar 19 годин тому

    Thanks sir. Prototype crystal clear 😊

  • @dragononfire7124
    @dragononfire7124 5 місяців тому

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

  • @hiphop861
    @hiphop861 8 місяців тому

    Thank you so much for going so deep in the leature

  • @heyMonikaa
    @heyMonikaa 3 місяці тому

    What a perfect shot to master

  • @niharikabhardwaj4598
    @niharikabhardwaj4598 2 місяці тому

    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 2 місяці тому

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

  • @Suraj.5260
    @Suraj.5260 9 місяців тому

    Awesome video sir Thank you .

  • @saptathirtachoudhury4158
    @saptathirtachoudhury4158 3 місяці тому

    Aapka motivation kam hone nahi denge Sir ji

  • @bhavinpatel9285
    @bhavinpatel9285 9 місяців тому

    itna easy kar dete ho na sir ji aap, dhanyvadddd ❤❤💕💕💕💕💕💕

  • @sawerasajid4309
    @sawerasajid4309 5 місяців тому

    congratulation sir on 200k

  • @sanantakumarrath1775
    @sanantakumarrath1775 11 місяців тому +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

  • @AnitaRani77
    @AnitaRani77 4 місяці тому

    You are amazing sir.

  • @jast_aryan-13
    @jast_aryan-13 6 місяців тому

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

  • @Jeevan0310
    @Jeevan0310 10 місяців тому

    sir, Thank you for this series.

  • @hemashah7031
    @hemashah7031 11 місяців тому

    too good, The Senior javascript dev level, thank you so much,

  • @nishu20501
    @nishu20501 6 місяців тому

    amazing lecture once again

  • @adilmian554
    @adilmian554 6 місяців тому

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

  • @deadlylive_gaming7154
    @deadlylive_gaming7154 5 місяців тому

    Sir's teaching is great!

  • @soniyakada595
    @soniyakada595 4 місяці тому

    Thankyou Sir for making such amazing videos 🪄

  • @Ke-bl4bd
    @Ke-bl4bd 5 днів тому

    Nice explanation 🙌👍

  • @kartikeytiwari9950
    @kartikeytiwari9950 10 місяців тому +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 10 місяців тому +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 10 місяців тому +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

  • @BitFire007
    @BitFire007 4 місяці тому +1

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

  • @nehabansal370
    @nehabansal370 4 місяці тому

    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.

  • @abdullahjawed1394
    @abdullahjawed1394 2 місяці тому

    Excellent Sir . Kindly make some video of node js and express js

  • @antinoarg
    @antinoarg 5 місяців тому

    excellent video sir🔥🔥

  • @vaibhav7009
    @vaibhav7009 Місяць тому

    PROTOTYPE EXAMPLE EXPLAINED BY YOU WAS NEXT LEVEL 🔥

  • @geekguri_tech
    @geekguri_tech 6 місяців тому

    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.

  • @thecalgarians4597
    @thecalgarians4597 3 місяці тому +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.

  • @ro0t115
    @ro0t115 4 місяці тому

    i would like to say this.teacher is awesome.

  • @fujelgaming9579
    @fujelgaming9579 11 днів тому

    a great level explanations sir

  • @HarshGupta-if2xg
    @HarshGupta-if2xg 11 місяців тому +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 9 місяців тому

      same

    • @OmkeshJadhav
      @OmkeshJadhav 4 місяці тому

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

  • @iambishwaa
    @iambishwaa 26 днів тому

    Finally Done ! ✅ Too deep.

  • @KhushiSingh-ft8dk
    @KhushiSingh-ft8dk Місяць тому

    Thank you so much sir....😇

  • @sinha.aditya
    @sinha.aditya 5 місяців тому

    Hitesh Sir ki Jay ho!!

  • @suyogadsod1633
    @suyogadsod1633 10 місяців тому

    Best series on UA-cam

  • @SatyendraSingh-mu2ux
    @SatyendraSingh-mu2ux 10 місяців тому

    maza aa gya sir ji😃

  • @user-gq7ff4nt5c
    @user-gq7ff4nt5c 4 місяці тому

    The guy is making the difference🔥

  • @nayanbiswas370
    @nayanbiswas370 6 місяців тому

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

  • @Dev-Phantom
    @Dev-Phantom 4 місяці тому

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