JavaScript Object Oriented Programming Tutorial Beginners - OOP in JavaScript

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ • 103

  • @sparkscomputerprogramming
    @sparkscomputerprogramming Рік тому +6

    this guy is young but can really teach like a professional. Thanks so much pedro

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

    Very easy to follow with! I am halfway through but will definitely complete the tutorial and work on a project with the learnings from here

  • @kanjakan
    @kanjakan 3 роки тому +10

    Your production quality is top notch. Your explanations are clear and concise and your humor is great.

  • @salvaddd
    @salvaddd 2 роки тому +9

    29:32
    There is now a standard way to set private properties (added in ES2022).
    class Person {
    #age
    constructor(name) {
    this.name = name; // public
    this.#age = 20; // private
    }
    }
    const p1 = new Person('joe')
    console.log(p1.age) // undefined

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

      You're logging age as you said to be a private member
      You didn't pass it to p1
      😂

  • @smnomad9276
    @smnomad9276 2 роки тому +16

    Hey man i was really confused about OOP and every video i watched confused me even more. You are inbelieveably talented when it comes to teaching, you explained everything in a very easy to follow way and went into all the small details without assuming that we already know certain things. I learned a lot thanks! I hope you can make courses on Udemy! Keep going and thanks again.❤

    • @PedroTechnologies
      @PedroTechnologies  2 роки тому

      Happy to hear :) This motivates me a lot! Also, I haven't told all subs yet but I'm 90% done with my first udemy course hahaha hope it goes well!

    • @davidjacopin-taho3998
      @davidjacopin-taho3998 2 роки тому

      Same thing for me, bought a 65h course on Udemy, spent 20h watching it so far to get nothing but confusion. I watched this video and finally understood! I might be able to get back to my course and follow through now, thx!

  • @Max-nm8ct
    @Max-nm8ct 3 роки тому +13

    I think you have huge potential in making videos as your way of explaining is very easy to follow and you seem to know a lot about what you are talking about. I do agree with other people in the comment section that , from abstraction onwards, you rush through the topics too quickly. I am a fan regardless, keep up the good work

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +2

      Hahaha thank you! I agree, I should have taken my time and prioritized the quality of the video over making it shorter.

  • @vladislavspisligins1561
    @vladislavspisligins1561 Рік тому

    18:28 "imagine, I got merried... Something, that's not gonna happen for few years" :D I don't know, is it honesty or sence of humor, but I like it.
    Also I agree with others, that the tutorial is well made!

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

    Thank you for the complete explanation! I think I finally got my head around OOP! 🤟

  • @charlestoneoyoo
    @charlestoneoyoo Рік тому

    I have really learnt a lot from this course, thank you so much Pedro. You are a great tutor

  • @chubamoa3640
    @chubamoa3640 3 роки тому +3

    can you make a video on type script and angular , really love the way you break things down into comprehensible chunks. This is way more helpful than any documentations out there.

  • @kristijanlazarev
    @kristijanlazarev Рік тому

    Very simple. I'm actually amazed! Love it!

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

    With JS, private variables are declared using # as prefix.

  • @missin3322
    @missin3322 3 роки тому +4

    Man I was also very confused with this.You made it super clear.Thank you.

  • @cyrilressi1114
    @cyrilressi1114 3 роки тому +2

    As many people said, it's exactly what I was looking for. Everything was clear, also for a beginner like me. Thanks for what you've done.
    You got a new subscriber too :D

  • @ugochiori2160
    @ugochiori2160 2 роки тому

    I definitely understand OOP better now. Thank you.

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

    Thank you so much. I am truly grateful.

  • @mark_asiimwe
    @mark_asiimwe Рік тому

    Getters and setters was kinda fancy until I watched this video, thank you Pedro.

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

    Hey Pedro thank you for this video ❤

  • @timbr1279
    @timbr1279 3 роки тому +2

    Thanks for such a simple explanation, this is awesome! ( log ctrl + space Enter => console.log) Go on, don't stop Bro

  • @abeasta7674
    @abeasta7674 2 роки тому

    Thank you Pedro, it was really useful for me.

  • @stalonfernandes
    @stalonfernandes 3 роки тому +1

    The Best OOP In JavaScript Video On The Planet

  • @vegasvato55
    @vegasvato55 3 роки тому +1

    HOW DO Y OU GET THE NEEW OBJECTED FROM THE CONSTRUCTOR CLASS INTO AN ARRAY???

  • @mfahriferdiansyah
    @mfahriferdiansyah Рік тому

    Thanks for the video, very clear explanation!!!

  • @apeiron4409
    @apeiron4409 3 роки тому +1

    This is a perfect tutorial for oop. Thanks!

  • @ricardocambundo2527
    @ricardocambundo2527 3 роки тому +5

    Thx so much bro
    This is exactly what I wanted. You’ve got a new subscriber 🔥💪

  • @josephmariga
    @josephmariga 3 роки тому +1

    Thanks. I have been having a hard time understanding OOP.

  • @vovaherchuk2777
    @vovaherchuk2777 3 роки тому +2

    Well, before ES6 or EcmaScrip2015 function constructors were used insted of classes (actually class - it's a simple syntax sugar). You can read more about this cos it gives you much more deep language understanding)
    Btw thx for such cool lesson!

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Yes! You are correct! There is no need for using the class syntax, it was made primarly to look like other languages!

  • @cappatech
    @cappatech 3 роки тому +1

    im using visual studio code, how can i use terminal section?!? It doesnt recognize the 'note' command for some reason. Can you help?
    P.S Thanks to your perfect tutorial!
    RESPECT!

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

    Very nice video! I would like to know when i have an object and i have some properties that holds some values , and another object need also that properties from the first object, how i impelement that correctly ?

  • @arturofreire9943
    @arturofreire9943 2 роки тому

    Começando com poo agora, esse vídeo é incrível

  • @fastislivee
    @fastislivee 3 роки тому +1

    Very well explained.Subbed!

  • @CuongVu-yy4cg
    @CuongVu-yy4cg Рік тому

    incredible tutorial. Thank you

  • @mohammadkamrul5310
    @mohammadkamrul5310 3 роки тому

    awesome man. thanks for the video. really loved it

  • @farandibrahim3261
    @farandibrahim3261 Рік тому

    May i know what theme you use in this video?

  • @ssekabirarobert-lr5cl
    @ssekabirarobert-lr5cl 10 місяців тому

    Thank u, how did u land ur first job

  • @kelkiiii
    @kelkiiii 3 роки тому

    Do you not want code from outside the class to have direct access to the fields for security reasons/context/convention/etc?

  • @aahsansiddiqui8680
    @aahsansiddiqui8680 3 роки тому

    Hi pedro OOP is a backend concept or frontend ? if i watn to become a front end develper then should i need to learn opp or not

    • @anthonyviniciusdossantosmu3062
      @anthonyviniciusdossantosmu3062 3 роки тому

      I am not the person you asked and I think my answer is a little late, but here it is: both, it's a front and back end concept

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

    Pls make a video on add to cart functionality using oop

  • @gaser6911
    @gaser6911 Рік тому

    amazing dud salah is the best greeting from Egy🦍

  • @nabhanabdullah2517
    @nabhanabdullah2517 2 роки тому

    Great content, really helpful! Thanks a lot

  • @hamzehqatash6256
    @hamzehqatash6256 3 роки тому

    thank you very much, it is really helpful.

  • @mdbicky9460
    @mdbicky9460 2 роки тому

    thanks mate such and beautiful video

  • @zababy
    @zababy 3 роки тому

    Damn that was so clear. Thanks

  • @pranjalwalia3810
    @pranjalwalia3810 3 роки тому +2

    Bro you're on 🔥

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Thank you! Glad you liked it!

    • @zakariaealami3135
      @zakariaealami3135 3 роки тому +1

      @@PedroTechnologies good content , but i see that you need to work better your SEO and marketing strategy ...good luck

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      @@zakariaealami3135 Thank you, I really appreciate it! Do you have any tips on improving my seo?

  • @vegasvato55
    @vegasvato55 3 роки тому

    ONCE THE CLASS CONSTRUCTOR IS CALLED AND CREATES THE NEW OBJECT, HOW DO I GET TH NEW OBJECT INTO AN OBJECT ARRAY???

  • @sivacharan3987
    @sivacharan3987 3 роки тому

    Sir,I have a doubt in oop in JavaScript.when can implement anything in JavaScript without oop also.Then what is the use of oop in JavaScript?When do We use oop in JavaScript?

    • @damonmartin1572
      @damonmartin1572 2 роки тому

      OOP and Procedural Oriented Programming are just paradimes. OOP's benifits grow in larger massive codebases as it helps get rid of a lot of repeated spaghetti code but in smaller code bases Procedural might still be ok. There's a reason why many of the top companies use it but you can not learn OOP with out first learning Procedural. Encapsulation and Abstraction are the main reasons why.

  • @eshw23
    @eshw23 2 роки тому

    Wait, your only 19? Ridiculously successful for your age bro keep it up

  • @varaprasad4163
    @varaprasad4163 3 роки тому +1

    got stuck at 23:33. but great explanation brudda.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Thank you! Abstraction is quite confusing at first, but the whole idea is that you separate ur code so that peopl working with you can access some functionality without having to understand how it works!

    • @varaprasad4163
      @varaprasad4163 3 роки тому

      @@PedroTechnologies now I understood everything. Please take care.👍

  • @jaidkarim9080
    @jaidkarim9080 2 роки тому

    bro how did u become so good at this at 19

  • @abhinavverma4111
    @abhinavverma4111 3 роки тому

    Super clear!!

  • @gilliantv9917
    @gilliantv9917 2 роки тому

    Thank you sir 🔥

  • @aghilannathan8169
    @aghilannathan8169 2 роки тому +1

    What the hell you go to my school. What a cool coincidence.

  • @rishibhatia900
    @rishibhatia900 3 роки тому

    excellent tutorial!

  • @MuhammadAwais-rp8po
    @MuhammadAwais-rp8po 3 роки тому

    Great content really helpful!
    Bro can you tell me which vs code theme you're using in this video?

  • @zarifaibrahimzade8097
    @zarifaibrahimzade8097 Рік тому

    Thank you !

  • @jurajhlavek7742
    @jurajhlavek7742 3 роки тому

    Very ncie explanation, you just got new subscriber. Can I ask you what is the VS code theme you use?

  • @Cappell7
    @Cappell7 3 роки тому

    amazing video bro

  • @alekodimitrov2635
    @alekodimitrov2635 3 роки тому

    timestamp 31:45

  • @Next.jsMastermind
    @Next.jsMastermind Місяць тому

    thanks man

  • @joseph7744
    @joseph7744 3 роки тому +1

    Shouldn't the syntax for methods be:
    getName() {
    }
    not
    getName = () => {
    }
    I'm pretty sure the former is what tells the JS engine to set the method on the prototype object where as the latter definition would create a new copy in memory of the getName method for every single instance of the Person class.

  • @LucasSilva-oy7fq
    @LucasSilva-oy7fq 3 роки тому +1

    Is it a new intro?

  • @usmanmughal5916
    @usmanmughal5916 3 роки тому +1

    You create an awesome and informative video but like you, I am not a UA-camr but I think you need to create different projects to grow your channel.

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +2

      Really appreciate it! I have put a lot of effort into the channel and I think its growing fast. Obviously I would love if it grew faster but I honestly don't know what I can do to increase the speed hahaha I know that certain videos will bring in more views (making a clone using firebase (and not actually write any backend code), use material ui, make videos on different languages). But I want to post stuff that will be helpful and not just to get views. Idk to be honest, but I am planning on making mre projects!

    • @usmanmughal5916
      @usmanmughal5916 3 роки тому

      @@PedroTechnologies Damn yea Sure!!!

  • @rayvincentdelacruz8251
    @rayvincentdelacruz8251 3 роки тому +1

    Cool bruh!

  • @thunderstack5365
    @thunderstack5365 3 роки тому +1

    Nice

  • @sandun7266
    @sandun7266 3 роки тому

    you are awesome

  • @CodeVideo
    @CodeVideo Рік тому

    Very 👍

  • @arbabmemon2095
    @arbabmemon2095 Рік тому

    👍👍👍

  • @alcymn
    @alcymn 2 роки тому

    L stanley

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

    Thanks!!