Prototype basics - Object Creation in JavaScript P3 - FunFunFunction #46

preview_player
Показать описание
💖 Support the show by becoming a Patreon

'We’ll go through the absolute basics of the prototype in this video. I’m going to explain why you should learn prototypes, and how they work.

Complete series playlist: "Object creation in JavaScript"

You’re probably used to doing inheritance with classes. JavaScript achieves inheritance using prototypes. The real-world analogy used when teaching classes is a blueprint - you have a blueprint of a building, and you use that blueprint to build buildings. The real-world analogy to a prototype is a delegate, a person that has been elected into office that will act on your behalf.

This video is for you if you are coming from another programming language into JavaScript and you’re already somewhat familiar with object oriented programming. You know what classes and inheritance is, but you’re confused about how object orientation is done in JavaScript.

💛 Follow on Twitch and support by becoming a Subscriber
We record the show live Mondays 7 AM PT

💛 Fun Fun Forum

💛 mpj on Twitter

💛 CircleCI (Show sponsor)
Robust and sleek Docker-based Continuous Integration as a service. I used CircleCI prior to them becoming a sponsor and I love that their free tier is powerful enough for small personal projects, even if they are private. Use this link when you sign up to let them know you came from here:

💛 Quokka (Show sponsor)
Wonder how MPJ evaluates JavaScript inline his editor. Quokka is the answer - use this link when you buy to let them know you came from here:

💛 FUN FUN FUNCTION
Since 2015, Fun Fun Function (FFF) is one of the longest running weekly YouTube shows on programming 🏅 thanks to its consistency and quality reaching 200,000+ developers.

🤦‍♂️ The Failing Together concept is what makes FFF unique. Most coding content out there focus on step-by-step tutorials. We think tutorials are too far removed from what everyday development is like. Instead, FFF has created a completely new learning environment where we grow from failure, by solving problems while intensively interacting with a live audience.

Tutorials try to solve a problem. Failing Together makes you grow as a developer and coworker.

📹 Each show is recorded live on Twitch in a 2-hour livestream on Mondays. The host, assisted by the audience, is tasked to complete a programming challenge by an expert guest. Like in the real world, we often fail, and learn from it. This, of course, reflects what the audience identifies with, and is one of the most praised aspects of the show.

⏯ On Fridays, an edited version of the show is adapted for and published on YouTube.

Content Topics revolve around: JavaScript, Functional Programming, Software Architecture, Quality Processes, Developer Career and Health, Team Collaboration, Software Development, Project Management
Рекомендации по теме
Комментарии
Автор

Super cool video. I like to think about it like this: in class there is an inheritance, in prototypes there is delegation. As a side-note or more like a personal confession I totally dislike adding Class to ES6. The reason of adding it to a language was to help to pick up a language for people who are coming from other programming languages. In my opinion it just made things more confusing than helpful. Things are getting even more confusing when cool frameworks / libs like React are adopting Class convention. End of crying :) Amazing video as always! Thanks a ton!

Автор

I am watching your videos from Morocco. Good material like yours is no common thing on the internet. Thanks.

mohammedrazani
Автор

Generally, I don't learn much from your channel, but I've subscribed and continue to watch because you're so entertaining. Keep up the good work.

CrapE_DM
Автор

Absolutly hillarious presentation! Prototypes are my family for years. So I know them well. Still I am watching your show just because you are so funny and the same time clear and understandable. So your show is nothing new to me but it helps me to explain things much better to my staff and customers!.

realB
Автор

been coding for like a year and a half, mostly learned from great videos and courses online
your videos are one of the most fun and educating i have ever seen
keep the amazing work !
fucking loving it !!!

saarushi
Автор

On episode two(this and bind)....thanks for this.video. Looking forward to watching many more. You are a good teacher.

drewmiller
Автор

I don't know about the accuracy of that delegate analogy but everything else was spot on

isaacdouglas
Автор

Thanks a lot MPJ for this video!
I wish I could have found an explanation as simple and clear sooner. Great job ;)

whitedwarf
Автор

I just wanted to say I've been doing pro javascript (like web work) for almost a year and a 1/2 now and this video really got me to think about prototypical inheritance in new ways. THANK YOU! ok now to watch that bind video.

liminal
Автор

I'm so excited to see his talk at BrazilJS. You motivated me to go.

mateusfernando
Автор

Thanks for this episode, eventually I could get some idea about prototypes.

aslanstamaliev
Автор

Thanks for including the examples at the very end that show how prototypes differ from classes (cannot change blueprints dynamically!)

MikeJfromVA
Автор

Mattias, you are so fun to watch man, I mean this in a good way, I love your spirit about programming, I am a juniorDev and I really learn stuff from you .. please keep it on/up.

oh! and please make an episode all about #RegExp

lenaggar
Автор

Thank you so much man, ive a so much better understanding of objects, prototype, bind and this! Wonderfully explained! : D :D

sesho
Автор

Your explanations and analogies just click. Thank you!

bhargavshah
Автор

This a mind bending explanation, "...don't try bend the spoon, instead, think, there is no spoon!"

pedroserapio
Автор

I liked how you compared classes vs. prototypes :) nice video mate, keep rollin' :)

mrastrogastro
Автор

Reading about pre&post 2015 classes + prototypes made me feel like I gained 40 IQ and a new philosophical outlook on how machines will take us over in the future. Thanks fun fun function

neilt
Автор

Dude, you're a trooper. Thanks for still doing a video even though you clearly didn't have the energy to <3

rchampa
Автор

Also reason 3 to know about prototype is that you will likely have to work with code at some point that uses it.

ociemitchell
join shbcf.ru