JavaScript Object Oriented Programming Tutorial Beginners - OOP in JavaScript

  Рет қаралды 59,564

PedroTech

PedroTech

Күн бұрын

Best Tech Resume Template: papermoontech.com/pmcsrtk/pedro
Use code: PEDRO for 20% off ^
Hey guys, I decided to make a tutorial on how to implement the Object Oriented Programming paradigm using JavaScript. OOP is a sequence of principles and design patterns that is very common in the world of programming. However, I don't see a lot of people learning it using JavaScript. SO in this tutorial I will go over the basics and also talk about the 4 pillars of OOP: Abstraction, Encapsulation, Inheritance, and Polymorphism.
-
🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
💻 PedroTech Discord: / discord
-
Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Website: machadopedro.com
Twitter: / pedrotech_
Linkedin: / machadop1407
Instagram: / _pedro.machado_
Github: github.com/machadop1407
Email: machadop1407@gmail.com
Timestamps
00:00 | Introduction
04:09 | Beginners
22:24 | Abstraction
27:50 | Encapsulation
31:45 | Inheritance
39:00 | Polymorphism
44:00 | Outro
Tags:
- Object oriented Programming
- JavaScript OOP
- ReactJS Tutorial
- ReactJS and MySQL
- NodeJS Tutorial
- API Tutorial

Пікірлер: 98
@abirmahmood7096
@abirmahmood7096 Жыл бұрын
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
@salvaddd
@salvaddd Жыл бұрын
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
@sparkscomputerprogramming
@sparkscomputerprogramming 10 ай бұрын
this guy is young but can really teach like a professional. Thanks so much pedro
@RemoteJuniorJobs
@RemoteJuniorJobs Жыл бұрын
Thank you for the complete explanation! I think I finally got my head around OOP! 🤟
@kristijanlazarev
@kristijanlazarev Жыл бұрын
Very simple. I'm actually amazed! Love it!
@ugochiori2160
@ugochiori2160 2 жыл бұрын
I definitely understand OOP better now. Thank you.
@charlestoneoyoo
@charlestoneoyoo 8 ай бұрын
I have really learnt a lot from this course, thank you so much Pedro. You are a great tutor
@cyrilressi1114
@cyrilressi1114 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
@abeasta7674
@abeasta7674 Жыл бұрын
Thank you Pedro, it was really useful for me.
@Max-nm8ct
@Max-nm8ct 3 жыл бұрын
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 жыл бұрын
Hahaha thank you! I agree, I should have taken my time and prioritized the quality of the video over making it shorter.
@kanjakan
@kanjakan 3 жыл бұрын
Your production quality is top notch. Your explanations are clear and concise and your humor is great.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hahaha appreciate the support!
@mfahriferdiansyah
@mfahriferdiansyah Жыл бұрын
Thanks for the video, very clear explanation!!!
@chubamoa3640
@chubamoa3640 2 жыл бұрын
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.
@barrygarrick8673
@barrygarrick8673 2 жыл бұрын
I agree documentations kinda slow you down
@harrisonvictor6493
@harrisonvictor6493 7 ай бұрын
Hey Pedro thank you for this video ❤
@CuongVu-yy4cg
@CuongVu-yy4cg Жыл бұрын
incredible tutorial. Thank you
@mohammadkamrul5310
@mohammadkamrul5310 2 жыл бұрын
awesome man. thanks for the video. really loved it
@zababy
@zababy 3 жыл бұрын
Damn that was so clear. Thanks
@arturofreire9943
@arturofreire9943 2 жыл бұрын
Começando com poo agora, esse vídeo é incrível
@ricardocambundo2527
@ricardocambundo2527 3 жыл бұрын
Thx so much bro This is exactly what I wanted. You’ve got a new subscriber 🔥💪
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thanks for the sub!
@zarifaibrahimzade8097
@zarifaibrahimzade8097 11 ай бұрын
Thank you !
@smnomad9276
@smnomad9276 2 жыл бұрын
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!
@mdbicky9460
@mdbicky9460 2 жыл бұрын
thanks mate such and beautiful video
@apeiron4409
@apeiron4409 3 жыл бұрын
This is a perfect tutorial for oop. Thanks!
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad it was helpful!
@mark_asiimwe
@mark_asiimwe Жыл бұрын
Getters and setters was kinda fancy until I watched this video, thank you Pedro.
@nabhanabdullah2517
@nabhanabdullah2517 2 жыл бұрын
Great content, really helpful! Thanks a lot
@nisargshah7531
@nisargshah7531 9 күн бұрын
With JS, private variables are declared using # as prefix.
@abhinavverma4111
@abhinavverma4111 3 жыл бұрын
Super clear!!
@missin3322
@missin3322 3 жыл бұрын
Man I was also very confused with this.You made it super clear.Thank you.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad to hear it!
@viajuiceology
@viajuiceology 2 жыл бұрын
this.You = him; lol, sorry had to
@BeasySemantic
@BeasySemantic 3 ай бұрын
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 ?
@hamzehqatash6256
@hamzehqatash6256 2 жыл бұрын
thank you very much, it is really helpful.
@gilliantv9917
@gilliantv9917 Жыл бұрын
Thank you sir 🔥
@MuhammadAwais-rp8po
@MuhammadAwais-rp8po 3 жыл бұрын
Great content really helpful! Bro can you tell me which vs code theme you're using in this video?
@kelkiiii
@kelkiiii 2 жыл бұрын
Do you not want code from outside the class to have direct access to the fields for security reasons/context/convention/etc?
@vegasvato55
@vegasvato55 3 жыл бұрын
HOW DO Y OU GET THE NEEW OBJECTED FROM THE CONSTRUCTOR CLASS INTO AN ARRAY???
@fastislivee
@fastislivee 3 жыл бұрын
Very well explained.Subbed!
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Awesome, thank you!
@timbr1279
@timbr1279 3 жыл бұрын
Thanks for such a simple explanation, this is awesome! ( log ctrl + space Enter => console.log) Go on, don't stop Bro
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it!
@jurajhlavek7742
@jurajhlavek7742 3 жыл бұрын
Very ncie explanation, you just got new subscriber. Can I ask you what is the VS code theme you use?
@josephmariga
@josephmariga 3 жыл бұрын
Thanks. I have been having a hard time understanding OOP.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad i could help!
@cappatech
@cappatech 2 жыл бұрын
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!
@vladislavspisligins1561
@vladislavspisligins1561 9 ай бұрын
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!
@gaser6911
@gaser6911 10 ай бұрын
amazing dud salah is the best greeting from Egy🦍
@ssekabirarobert-lr5cl
@ssekabirarobert-lr5cl 6 ай бұрын
Thank u, how did u land ur first job
@farandibrahim3261
@farandibrahim3261 Жыл бұрын
May i know what theme you use in this video?
@vovaherchuk2777
@vovaherchuk2777 3 жыл бұрын
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!
@rishibhatia900
@rishibhatia900 3 жыл бұрын
excellent tutorial!
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it!
@Cappell7
@Cappell7 3 жыл бұрын
amazing video bro
@stalonfernandes
@stalonfernandes 3 жыл бұрын
The Best OOP In JavaScript Video On The Planet
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you!
@pranjalwalia3810
@pranjalwalia3810 3 жыл бұрын
Bro you're on 🔥
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you! Glad you liked it!
@zakariaealami3135
@zakariaealami3135 3 жыл бұрын
@@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?
@sandun7266
@sandun7266 2 жыл бұрын
you are awesome
@CodeVideo
@CodeVideo Жыл бұрын
Very 👍
@jaidkarim9080
@jaidkarim9080 2 жыл бұрын
bro how did u become so good at this at 19
@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
@rayvincentdelacruz8251
@rayvincentdelacruz8251 3 жыл бұрын
Cool bruh!
@teja.4
@teja.4 3 жыл бұрын
You watched in no time
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Lmao this commented less then 1 minute after it went live
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you bro! Really appreciate it!
@eshw23
@eshw23 2 жыл бұрын
Wait, your only 19? Ridiculously successful for your age bro keep it up
@sivacharan3987
@sivacharan3987 2 жыл бұрын
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.
@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???
@zeetheartist2563
@zeetheartist2563 2 жыл бұрын
.PUSH() I THINK
@arbabmemon2095
@arbabmemon2095 Жыл бұрын
👍👍👍
@thunderstack5365
@thunderstack5365 3 жыл бұрын
Nice
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it!
@thunderstack5365
@thunderstack5365 3 жыл бұрын
@@PedroTechnologies hey can you make videos on ml algorithms
@aghilannathan8169
@aghilannathan8169 2 жыл бұрын
What the hell you go to my school. What a cool coincidence.
@PedroTechnologies
@PedroTechnologies 2 жыл бұрын
Hahaha you are from UBC? What year?
@joseph7744
@joseph7744 2 жыл бұрын
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.
@varaprasad4163
@varaprasad4163 3 жыл бұрын
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.👍
@LucasSilva-oy7fq
@LucasSilva-oy7fq 3 жыл бұрын
Is it a new intro?
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Yes!
@alekodimitrov2635
@alekodimitrov2635 2 жыл бұрын
timestamp 31:45
@usmanmughal5916
@usmanmughal5916 3 жыл бұрын
You create an awesome and informative video but like you, I am not a KZbinr but I think you need to create different projects to grow your channel.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
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!!!
@alcymn
@alcymn 2 жыл бұрын
L stanley
@phyf3
@phyf3 2 жыл бұрын
Thank you!
All The JavaScript You Need To Know For React
28:00
PedroTech
Рет қаралды 588 М.
Object-oriented Programming in JavaScript: Made Super Simple | Mosh
1:02:49
Programming with Mosh
Рет қаралды 1,9 МЛН
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 14 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 20 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
Ditch your Favorite Programming Paradigm
6:08
Code Persist
Рет қаралды 174 М.
JavaScript OOP Crash Course (ES5 & ES6)
40:21
Traversy Media
Рет қаралды 584 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 919 М.
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 229 М.
Fundamental Concepts of Object Oriented Programming
9:16
Computer Science
Рет қаралды 875 М.
Abstraction Can Make Your Code Worse
5:13
CodeAesthetic
Рет қаралды 631 М.
Building Fluent Interfaces in TypeScript
16:15
Andrew Burgess
Рет қаралды 13 М.
Intro to Object Oriented Programming - Crash Course
30:18
freeCodeCamp.org
Рет қаралды 932 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
İĞNE İLE TELEFON TEMİZLEMEK!🤯
0:17
Safak Novruz
Рет қаралды 1,1 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 3,3 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 63 МЛН