__proto__ vs prototype - Object Creation in JavaScript P5 - FunFunFunction #52

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

We explore the __proto__ property on JavaScript Objects, and how it relates to the normal prototype. Basically, the .__proto__ property points to the object that the current object actually will use when doing lookups on the prototype chain, while ".prototype" only exists on functions, in case you want to use those objects as constructors
passed to the new keyword.

# Stuff mentioned in the video:

• Full series: Object creation in JavaScript

• Music in the video: Peacock by 7 minutes dead

💛 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
Рекомендации по теме
Комментарии
Автор

I've learned more about JavaScript from this channel (and been entertained in the process) in a week than I had learned in 6 months I swear.

ElderSnake
Автор

Best take away from this episode? Your newfound love for munchkin cats 😂

jeis
Автор

i had one problem
tried to solve it using prototypes and 'this'

Now I've 3 problems

ahmarsiddiqui
Автор

Two-and-three-quarter minutes: pause video, stop laughing, wipe eyes. Now I have to decide whether I just press Play or if I rewind That. I truly love the internet. Thanks MPJ. You make Mondays better. :)

squarebie
Автор

Let me spoil this terrific video with some pedantic comments:
1. __proto__ isn't a property on myCat directly, it is in fact an accessor property ("get"/"set") on Object.prototype. You can in fact see this later in the video once Object.prototype is printed.
2. It is not true that all objects ultimately delegate to Object.prototype, I can totally create, using Object.create, an object with a null prototype, or a chain which doesn't lead to Object.protoype. And because of point 1. above, __proto__ will not be available on such an object.

stephanhouben
Автор

To be completely honest, I've been working with JS for almost 8 years, and by watching your videos, I pretty much revisited a bunch of stuff that I actually forgot how to work, but was using it at daily for years. I totally forgot some of the foundation topics and realized that, IMHO, JS community pushed many of us a lot into frameworks and hype, instead of relying on the core stuff. Very good videos, I'm gonna show these to my wife so she can learn :)

ShinigamYpn
Автор

Good Monday morning and welcome to Fun Fun Object :D

Long winded siide note: about 2 months ago I discovered Elixir and Elm from perusing your tweets, and I've been falling in love with Elm, so thanks for that! Elm's Maybe.andThen function has helped me to finally kind of understand monads, and more specifically the monadic bind operator (>>= in haskell), which `andThen` is surprisingly an implementation of for Maybe. It's funny that they can low-key teach you a notoriously difficult to grasp concept that gets avoided at every frp conference by just naming it something else.

Several days ago I finished rewriting a big project for a Minecraft redstone channel of which I am a member(although the project in question won't see the light of day until another much bigger project is completed), and once I got a hang of solving problems in a purely functional paradigm, it became almost trivial to write large-ish blocks of code that either work the first time, or after I fix some typos or minor type errors that the compiler kindly points out.

MorganEarlJones
Автор

MPJ you are amazing! I was watching this while my wife was next to me. She told me she was able to follow along even though she's never done any programming herself. Thank you so much for putting up these videos! One thing I would like to see, I wonder if I will even be able to describe it well, is an explanation of how an object goes down a rabbit hole. Sometimes I will be debugging with dev tools and see an object that goes Child/Parents/Child/Parent all the way down without showing me any usable information. I know that likely isn't very clear so will try to do a screen grab next time it comes up. Thanks again!

Yusifinify
Автор

i watched 14 videos before and lastly i got perfect understanding from here

gujjucarry
Автор

Thank you so much for this video! It really helped me finally to somehow understand the magic behind __proto__ vs prototype a little bit better! Keep up the good work! Cheers

adrianwyss
Автор

I just got a job that requires javascript. I come from working using C# C++ and java, your videos are very helpful, thank you.

lrutubeusername
Автор

I am reading Kyle Simpson's book series and I had doubts about the prototype property, but after watching your video, I don't have them anymore. Amazing content

emmanuels.r
Автор

OMG, you are the first guy who explains this __proto__ and prototype thing so clearly. Even better than my teacher. Thank you!

sleepycat
Автор

As current iterations of ES add more deceiving styling it feels as if it's more important than ever to bind ourselves to the root functionality in order to more cautiously apply the new syntax. Thank you so much for taking the time to demystify some of the more daunting aspects of JavaScript architecture. For me personally this lecture series has been the most valuable of all funfunfunction tutorials! (My comment didn't start out as wordplay, for the record...)

TylerStraub
Автор

Keep up the good work! Im a professional PHP and Java-developer for about 10-12 years now. Your videos really opened my eyes.
Just learnt React, MongoDB & GraphQL last week. Awesome technology!
Were also in the process to migrate over to a more javascript-based application for our services.. since we run everything on Java atm.

Also really entertaining to watch, it makes it much more fun to learn than just scrolling through thousands of pages of Documentations...

Im really excited and keep up the good work! <333

Snuffish
Автор

Thx man, I've just discovered your channel for myself as for guy which trying to switch from .Net world into the JS one. Your videos really help me ;)

josikke
Автор

Great way to explain it all - passing this video around to my students in the future.

ruegen_
Автор

Perfectly clear! Best explanations i ever heard, thanks!

PauloSantos-yutn
Автор

I think I watched this Object series 2 or 3 times as a reference.
After about a month, I finally get it. Thank god.

jmack
Автор

00:00 "good morning morning!!!" energetic and ready to be productive
02:40 falls into rabbit hole watching cats on the Internet.

cboisvert
welcome to shbcf.ru