Тёмный
No video :(

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

Fun Fun Function
Подписаться 263 тыс.
Просмотров 112 тыс.
50% 1

💖 Support the show by becoming a Patreon
/ funfunfunction
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
goo.gl/pCt2tX
• Music in the video: Peacock by 7 minutes dead
• 7 Minutes Dead - Peacock
💛 Follow on Twitch and support by becoming a Subscriber
We record the show live Mondays 7 AM PT
/ funfunfunction
💛 Fun Fun Forum
Private discussion forum with other viewers in between shows. www.funfunforu.... Available to patron members, become one at / funfunfunction
💛 mpj on Twitter
/ mpjme
💛 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:
circleci.funfu...
💛 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:
quokka.funfunfu...
💛 FUN FUN FUNCTION
Since 2015, Fun Fun Function (FFF) is one of the longest running weekly RU-vid 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 RU-vid.
Content Topics revolve around: JavaScript, Functional Programming, Software Architecture, Quality Processes, Developer Career and Health, Team Collaboration, Software Development, Project Management

Опубликовано:

 

27 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 310   
@ElderSnake90
@ElderSnake90 8 лет назад
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.
@rebornreaper194
@rebornreaper194 6 лет назад
ElderSnake90 Amen
@jeis93
@jeis93 8 лет назад
Best take away from this episode? Your newfound love for munchkin cats 😂
@funfunfunction
@funfunfunction 8 лет назад
+Joel Eisner (jeis93) yes
@JorisGriffioen
@JorisGriffioen 7 лет назад
... and refusal to use autocomplete
@jeis93
@jeis93 7 лет назад
Joris Griffioen ?
@CameronChardukian
@CameronChardukian 5 лет назад
Ahhh just realized you beat me to this by 2 years hahahaha
@ahmarsiddiqui
@ahmarsiddiqui 8 лет назад
i had one problem tried to solve it using prototypes and 'this' Now I've 3 problems
@victornaut
@victornaut 7 лет назад
Use regex too.
@PhillipSenn
@PhillipSenn 7 лет назад
I decided to use an example. Now I have 4 problems.
@jakobsternberg1807
@jakobsternberg1807 7 лет назад
i got 99 problems but this aint one
@danish6192
@danish6192 5 лет назад
same here :p @@jakobsternberg1807
@stephanhouben6973
@stephanhouben6973 5 лет назад
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.
@stiventson4464
@stiventson4464 5 лет назад
So, how the *** does myCat have access to the __proto__ property?? o.O
@mackzle
@mackzle 5 лет назад
Nice! Stephan's referring to 12:29 for point#2 here.
@ellaa_nashwara
@ellaa_nashwara 5 лет назад
@@stiventson4464 , That is because, JavaScript engines traverses up the prototype chain for the "myobject" object and ___proto___ accessor is a property defined on the Object constructor function's "prototype" object.
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 4 года назад
I am already on my way to the terrace xD
@lrutubeusername
@lrutubeusername 8 лет назад
I just got a job that requires javascript. I come from working using C# C++ and java, your videos are very helpful, thank you.
@PauloSantos-yu1tn
@PauloSantos-yu1tn 6 лет назад
Perfectly clear! Best explanations i ever heard, thanks!
@gujjucarry848
@gujjucarry848 2 года назад
i watched 14 videos before and lastly i got perfect understanding from here
@jepas90
@jepas90 8 лет назад
I'm a simple JS developer I see new episode of FunFunFunction, I press like!
@eugenea8264
@eugenea8264 6 лет назад
Come to see Australia, man. You will press like every time you hear the word Koala too. :)
@adrianwyss4705
@adrianwyss4705 7 лет назад
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
@squarebie
@squarebie 8 лет назад
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. :)
@cboisvert2
@cboisvert2 4 года назад
00:00 "good morning morning!!!" energetic and ready to be productive 02:40 falls into rabbit hole watching cats on the Internet.
@godintheshell
@godintheshell 4 года назад
Wish i had known this channel sooner. All of my struggle with Javascript for the past 6 months finally has a cure!!!
@lenhu7089
@lenhu7089 4 года назад
Hello , are you Vietnamese. I AM Vietnamese too. Can we learn together?
@godintheshell
@godintheshell 4 года назад
@@lenhu7089 okay bạn mà học chung sao bạn? Mình đang học front end
@julianfbeck
@julianfbeck 8 лет назад
i love the style of your videos great work!
@BB-sg8ik
@BB-sg8ik 7 лет назад
This guy and Anthony Alicea are the best at describing js oddities.
@funfunfunction
@funfunfunction 7 лет назад
+Brandon Brigance thanks!
@sleepycat2911
@sleepycat2911 7 лет назад
OMG, you are the first guy who explains this __proto__ and prototype thing so clearly. Even better than my teacher. Thank you!
@ruegen_9443
@ruegen_9443 8 лет назад
Great way to explain it all - passing this video around to my students in the future.
@jmack6046
@jmack6046 7 лет назад
I think I watched this Object series 2 or 3 times as a reference. After about a month, I finally get it. Thank god.
@TylerStraub
@TylerStraub 8 лет назад
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...)
@MorganEarlJones
@MorganEarlJones 8 лет назад
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.
@yassine_klilich
@yassine_klilich 5 лет назад
Great explanation for the "__proto__" property, but I'm sure that some beginners could not grasp what ''prototype'' property means. For me, it seems like we define a static property in C# for example. So, all the objects that will be created by a constructor function, and if the constructor function has a property in the 'prototype' property, the property that is inside of the 'prototype' property will be a static property or a static function if it was a function for the created objects. It's so easy in C# and Java to implement it, but when I came to JavaScript it really took me time to understand it. this simple example will give some idea of what I'm trying to explain : function foo() { this.prop = 'No Name'; } foo.prototype.prop2 = 'Hi'; let obj1 = new foo(); let obj2 = new foo(); // Try first this : obj1.prop2 = 'Hello'; // Then this : //obj1.__proto__.prop2 = 'Hello'; console.log(obj1.prop2); console.log(obj1.__proto__.prop2); console.log(obj2.prop2); console.log(obj1); console.log(obj2); console.log(foo); ==> Great video, You really have a good content, plz don't stop doing more explanations on JS.
@squarebie
@squarebie 8 лет назад
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 InterWebs. Thanks MPJ. You make Mondays better. :)
@karanverma1
@karanverma1 8 лет назад
prototype should have called "prototypeToConfuseYou" has to watch is twice to understand it.. __proto__ and prototype
@emmanuels.r9957
@emmanuels.r9957 4 года назад
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
@ShinigamYpn
@ShinigamYpn 7 лет назад
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 :)
@mohammadkermani2987
@mohammadkermani2987 6 лет назад
This episode was much more clear than the one that was teaching 'new' keyword. Thanks
@Yusifinify
@Yusifinify 6 лет назад
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!
@Nikolai2i
@Nikolai2i 8 лет назад
I like these javascript episodes it's clearify confusing concepts in JS. Thank you for doing it 😊
@mikkqu
@mikkqu 6 лет назад
The outcome I got from this: 'prototype' property only exists on functions, so objects can be created with 'new' keyword. It is empty by default and it is what get assigned as '__proto__' of an object returned by 'new'. The object where actual property lookup is delegated to (down to the chain) is the content of '__proto__' property which exists both on functions and on objects (though '__proto__' is not part of the language and can not be used reliably).
@wlainerribeiro1285
@wlainerribeiro1285 8 лет назад
__proto__ is also known as dunder proto.
@cevxj
@cevxj 7 лет назад
this was awesome, and honestly better than the earlier ones. Might be the browser environment and the knowledge build up at this point in the series, but, I think it's a significant improvement.
@jonchurch5444
@jonchurch5444 8 лет назад
Object.newPrototype ? Loved this video, I understand object creation so much better because of this series! Have also really enjoyed your pair programming stuff. Seeing experienced developers go through the trial and error of real projects is really helpful to me in my journey learning javascript. Great to see that everyone runs into silly problems and, useful to see you work through them!
@Musikur
@Musikur 2 года назад
Except it doesn't add a new prototype, it adds a property to the existing prototype.
@shivangchaturvedi237
@shivangchaturvedi237 3 года назад
If you are standing alongside Chris Hemsworth, I will run over him to shake your hands instead. That's how happy this series has made me.
@AhmadKayyali1
@AhmadKayyali1 6 лет назад
I had a tough start to my morning, and wanted to thank you for making me laugh with the munchkin cat. You're the best
@kuken72
@kuken72 7 лет назад
Tack som fan för de här videona! Du är sjukt pedagogisk, till skillnad från de flesta som försöker lära ut programmering...
@ramazytube
@ramazytube 8 лет назад
Thank you for this episode. I have read a lot about __proto__ vs prototype, but only now I start to understand the difference.
@JoelSwensenM
@JoelSwensenM 7 лет назад
I've heard people pronounce __proto__ "dunder proto".
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 7 лет назад
Yep. Short for "double underscore".
@Zen-lz1hc
@Zen-lz1hc 3 года назад
Thank you so much !!! Everything is so cristal clear now ! Thank you man really really appreciated ! The internet and the youtube is full of confusion about this prototype topic . I watched many videos and those guys confused me more . Your video clicked , everything makes sense now , Thank you I can't say enouth , thank you !
@xhubbx
@xhubbx 7 лет назад
You can also check that Object is a function by typing: > typeof Object < "function" Great channel, thank you!
@Snuffish
@Snuffish 6 лет назад
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!
@NemesisA5
@NemesisA5 5 лет назад
Very clear explanation , thanks
@maxpaint
@maxpaint 4 года назад
After watching and reading different explanations of the topic, at last, I understood the difference between properties "prototype" and "__proto__". Even though explanation already was in this video, I still couldn't figure out, if prototype and __proto__ basically means the same thing and even points to the same object, why they can't be just one property, why we need both? So, the reason is - it's actually two different things. "__proto__" points to the parent prototype which "created" current object, and "prototype" points (creates) to new prototype object which can be later used as a parent prototype for objects inherited from the current object. Here's a code example: function foo1() {} foo2 = new foo1(); foo3 = new foo3(); In this case foo2.__proto__ === foo1.prototype, foo3.__proto__ === foo2.prototype and so on. I hope this explanation will help somebody.
@gohil_yajur
@gohil_yajur 8 лет назад
The final few minutes were really gold - it was unclear at first - but revisiting it makes it a little bit more understandable Also - THANK YOU this series is great
@saltech2024
@saltech2024 Год назад
Your comment made me watch the video to end myDoggie__proto__ myDoggie.prototype Just explain everything
@josik4ke
@josik4ke 7 лет назад
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 ;)
@JBuchmann
@JBuchmann 6 лет назад
This video helped tons, but it really sank in after experimenting on my own. In my experiments, I can describe it like this: When you do function Dog() {}, then Dog will have a "prototype" but not "__proto__. When you instantiate the dog into an object... const myDog = new Dog() Then myDog will have a __proto__ but no prototype. If you create an object from an "object literal". For example: const Dog = {} Then Dog will not have a prototype, but will have a __proto__. But the __proto__ will be equal to the global object. (Object.prototype).
@saltech2024
@saltech2024 Год назад
Great Permit me to screenshot your comment It will be good for health 😅
@tomalata5742
@tomalata5742 Год назад
This video cleared everything finally
@marcziel5424
@marcziel5424 7 лет назад
To make things more confusing: Object is also an object because all functions are objects. Another interesting thing is that __proto__ of a function is a function. Yay!
@gotxe
@gotxe 8 лет назад
Just a little tip on typing in Chrome console - press whenever you want autocomplete the thing you're typing :) Thanks for the video!
@fatemeetsluck
@fatemeetsluck 3 года назад
This video really helped me understand how to implement prototype semantics in my own scripting language. Thanks!
@tejeswarsahu2498
@tejeswarsahu2498 6 лет назад
This is very helpful.I was just wondering what is this __proto__ and prototype.Then your explanation made everything clear
@jugzster
@jugzster 7 лет назад
Google search for munchkin cats has skyrocketed immediately after this video
@germangrasso1867
@germangrasso1867 7 лет назад
Excellent episode as usual. Very clear to understand the difference between __proto__ and prototype. Thanks Mattias!
@DaddyChronic
@DaddyChronic 8 лет назад
again, thank you for your great videos about JavaScript. suggest you should mention, that a function always returns this by default, unless you do not return something else. for that to remember I always write return this; into the last line of a Constructor function or in this case a no constructor finction. function no_constructor() { var myList = [ "cat","dog","crocodile"]; this.showItem = function( id ) { return myList [ id ]; }; this.howMuch = function( id ) { return myList.length; }; return this; } var animal = no_constructor(); alert(animal.showItem( 0 ) ); alert(animal.howMuch() );
@danielorodriguez1689
@danielorodriguez1689 8 лет назад
Var has better performance and works everywhere, so don't be a fool.
@danielorodriguez1689
@danielorodriguez1689 8 лет назад
You just said stop using bar without any reason, just because you feel it is old and outdated. Instead I gave you two good reasons for using it.
@HardwareAddiction
@HardwareAddiction 7 лет назад
While I understand your example, I think you should add a note that it's considered bad practice to define methods like that. Secondly, I think this kind of practice only adds bloat to your code and is very unnecessary! You should also fix: "unless you do not return something else" to "unless you return...".
@alejandropelozatto4377
@alejandropelozatto4377 2 года назад
my language is not english but i understood it really really clear. Thanks for your big contribution
@eugenea8264
@eugenea8264 6 лет назад
Thank you from all Australian JS developers for mentioning KOALA and crocodile. It means a lot to us. Come over and hug one.
@gianlucacioni93
@gianlucacioni93 3 года назад
Amazing content!! love your style
@nipunparadkar9458
@nipunparadkar9458 6 лет назад
Thanks man. I've finally understood Prototypes.
@Mai_Bharatwaasi
@Mai_Bharatwaasi 3 года назад
prototype=prototypeToBeUsed perfect!!! Thank you.
@P4triknator
@P4triknator 8 лет назад
Please continue your series next week. You discussing all the type of questions I asked for as I began as a JS-deveoper one year ago. I almost gave up because all this stuff confused me so much but after all, JS just makes more fun as c# for me :-) (never thought that..). I've really NOWHERE found that simple reference, that describes the difference between __proto__ and prototype. I wasted approximately 4 days of time to explore that and as a result, I lost my motivation and gave up... So annoying. Thanks for all your stuff and go on :-*
@DaddyChronic
@DaddyChronic 8 лет назад
dont give up. I am coding JavaScript since 1998 and I am still confused by it. This Video helped me a lot.
@funfunfunction
@funfunfunction 8 лет назад
+Pad0r thanks a lot for your kind words! Can't promise I'll continue next week, but I definitely want to continue this series, in learning a lot myself.
@P4triknator
@P4triknator 8 лет назад
funfunfunction You spend so much time to us, I just want you recognize that there are people out there who are very great full for that. :-) I worked for a large company in past and I think, one of the biggest issues is, that everyone has to be perfect. Any tasks have to be done in time and fails are not allowed. It's most of the time a estimate failing to catch up customers (to tell the truth). But this digital world is just to complicated to give accurate estimations without getting time trouble. I hope that attitude will be change in the future.
@vincenr8822
@vincenr8822 6 лет назад
MIND.. BLOWN..
@keithho5335
@keithho5335 6 лет назад
great munchkin cat exposure!
@tasselvr5866
@tasselvr5866 7 лет назад
so glad for let and const
@Musikur
@Musikur 2 года назад
Object.prototypeAddProperty seems like the most logical thing it could have been to me since this is exactly what it does: adds a property. Although then it probably should have been a method like Object.prototypeAddProperty('foo', 'bar') or something
@alexanderbrown1178
@alexanderbrown1178 8 лет назад
Another great video! I'm really looking forward to more info on prototypal 'inheritance'. Thanks for all your hard work on these videos MPJ, please keep them coming! :)
@vikramfugro3886
@vikramfugro3886 8 лет назад
Nice! That was very insightful. Totally agree with the term "Prototypal Delegation". ;) Just to add my 2 cents: Basically everything is objects in JavaScript. (or that's how I try to understand it) I will refer to "created from" as "instantiation of the type's prototype field". Maybe "instantiation" is not the right word here, couldn't think of a better term. "Object", "Function", "Array", or custom ones such as function abc () { } are all "Function" objects. Yes, "Function" is a "Function" object. Will elaborate it later. > typeof Object -> 'function' > tyepof Function -> 'function' > typeof abc -> 'function' > typeof Array -> 'function' Next, "Object" is a function object so that tells us that it was created from "Function", which means: > Object.__proto__ == Function.prototype -> true > Array.__proto__ == Function.prototype -> true > abc.__proto__ == Function.prototype -> true "Function" is bit special and is used to create a function object, which means > typeof Function.prototype -> 'function' For others: > typeof Array.prototype -> 'object' > typeof Number.prototype -> 'object' As usual (for custom ones): > typeof abc.prototype -> 'abc {}', because > abc.prototype.__proto__ == Object.prototype -> true and: > typeof Object.prototype -> 'object', which I believe is the root of all objects, because: > Object.prototype.__proto__ -> null > Array.prototype.__proto__ -> 'object' > Array.prototype.__proto__ == Object.prototype -> 'true' > Array.prototype.__proto__.__proto__ -> null > Function.prototype.__proto__ -> 'object' > Function.prototype.__proto__ == Object.prototype -> 'true' > Function.prototype.__proto__.__proto__ -> null Now, at the beginning I had mentioned that "Function" is a "Function" object, because > Function.prototype == Function.__proto__ -> true, which makes me think that "Function" is created from itself :)
@wilcorrea
@wilcorrea 8 лет назад
Best explanation about mad __proto__. Till next monday morning ; )
@JohnGodwin777
@JohnGodwin777 6 лет назад
This is some brilliant comedy
@alirahmani5601
@alirahmani5601 2 года назад
I love how he searched to find a cat breed in the middle of the tutorial just to come up with an example! 😂
@UlissesOliva
@UlissesOliva 5 лет назад
You are amazing! Thanks from Brazil.
@feyzullahyldz4829
@feyzullahyldz4829 6 лет назад
you are surprisingme everytime
@ZarateAdriel
@ZarateAdriel 5 лет назад
I understood that __proto__ is the same to the prototype of the constructor function. I mean: objFromConstructor.__proto === Constructor.prototype
@funfunfunction
@funfunfunction 5 лет назад
Yeah, that's a good way of thinking about it.
@agorafobicoMusica
@agorafobicoMusica 7 лет назад
Now everyone is trying Object.prototype={} . Thanks for the video!
@NazS2
@NazS2 8 лет назад
fun, clear and informative! #KeepUpTheGoodWork !!
@vladvoloshenko5701
@vladvoloshenko5701 2 года назад
awesome video, thank you
@aldaineclarke755
@aldaineclarke755 3 года назад
Great video..Learnt alot..Thanks👍👍👍
@niltoncmsantos
@niltoncmsantos 7 лет назад
Probably the best name convention should be `.prototypePrototype` haha
@copyrightfreemusic1666
@copyrightfreemusic1666 3 года назад
very nice. But worth to note.....while reading The MDN docs ......it actually flung over my head
@iamdanyaal
@iamdanyaal 2 года назад
Thank You Sir
@francisngo
@francisngo 7 лет назад
Great great video! I have learned so much because it's fun watching your videos. My only suggestion is that you use a small whiteboard instead of paper. It seems like an awful lot of paper being used.
@funfunfunction
@funfunfunction 7 лет назад
+Francis Ngo whiteboards have glare and I can throw them around and tear them. ;) also, considering food packaging, newspaper, advertising and postal main, the paper I use in these videos is by far my best use of paper all week among myself and everyone I know.
@THTerra
@THTerra 8 лет назад
I love your Videos.
@robertobenedit
@robertobenedit 2 года назад
bestExplanationEver 💻👌😊
@SlavaShp
@SlavaShp 7 лет назад
Well explained, I will use the pen delegation example when I explain prototype to others. You should do an episode about the difference between changing a property value on the prototype object vs changing it on an object with the same prototype. It also confuses a lot of people.
@funfunfunction
@funfunfunction 7 лет назад
+Slava Shp. I do some of that in this one: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-PIkA60I0dKU.html
@funfunfunction
@funfunfunction 7 лет назад
+Slava Shp. Or now that I look at it again, it might still warrant some more examples. Perhaps while explaining the chain.
@abhishekprasad6691
@abhishekprasad6691 4 года назад
I think we have found "Fluffykins" 2:30
@Marcosmapf
@Marcosmapf 5 лет назад
10:50 Had I defined breed inside of dog, or like Dog.breed = value, what would be the difference from Dog.prototype.breed when using new? Wouldn't you have access to breed either way?
@tunesofia
@tunesofia 8 лет назад
Mpj i was curious to know what kind of books would you recommend to know a bit more about javascript underlines and also about design patterns. Maybe you could do a video about this topic and talk about your professional path and what resources you used to help you grow as a developer?
@matts4304
@matts4304 7 лет назад
great vid. thanks!
@andreykoshkarov
@andreykoshkarov 7 лет назад
Good explanation, thanks
@georgecrisan9499
@georgecrisan9499 8 лет назад
Thank you Sir. funny the cat part and smooth __proto__ delegation to comedy.
@uhN0id
@uhN0id 7 лет назад
You got distracted by looking up cat pictures. That is a true real world problem for developers today haha.
@jvkiet
@jvkiet 6 лет назад
I finally understand. Thank you!!!
@laszlo1805
@laszlo1805 8 лет назад
Loving the watch!
@jacobc5655
@jacobc5655 8 лет назад
great video as always!
@hrishikeshakolkar5703
@hrishikeshakolkar5703 6 лет назад
that was azaming and I liked your wristwach mpj :D
@sidarjunful
@sidarjunful 9 месяцев назад
I want him back with react tutorials this time.
@sahandsanaei555
@sahandsanaei555 Год назад
thank you!
@MrPyogi
@MrPyogi 6 лет назад
You are Great!
@nerbiz
@nerbiz 6 лет назад
Thanks for this clear and entertaining video! There is however one thing that I don't understand about setting prototype properties, I'll show with an example: const test = ['one', 'two']; Array.prototype.wot = function wot() { return 'm8'; }; console.log(test.__proto__.slice); console.log(test.__proto__.wot); for(let x in test) console.log(test[x]); Output: [Function: slice] [Function: wot] one two [Function: wot] Why does 'wot' show up in the loop, but 'slice' doesn't? Or why does 'wot' appear there at all?
@frawel
@frawel 6 лет назад
@Nerbiz Dijkstra When using a for-in loop, you are using the property approach to access indices, the method that you add to the Array.prototype are included inside of your properties In the case of the "slice" method, it's an existing one, it was not added by you. If you do not want this behavior your better use a for-loops instead. Regards
@nerbiz
@nerbiz 6 лет назад
Thank you for your reply :) it's a bit clearer now. And I guess I could've used a different type, it's weird to use for-in loops with arrays. Anyway, thanks for your explanation!
@SergeyBaranyuk
@SergeyBaranyuk 8 лет назад
As usual... GREAT !!) Thanks
@maratsahakyan7759
@maratsahakyan7759 2 года назад
Thank You 🤠
@joshuaruvalcaba9199
@joshuaruvalcaba9199 3 года назад
Instead of Object.setprop you can just use Object.create and it will do the same thing link the prototype to the object
@TheDataArchitect
@TheDataArchitect 6 лет назад
once more, you are amazing man...
Далее
What is __proto__ ? | Javascript Prototypes Tutorial
23:11
Object Oriented Programming vs Functional Programming
18:55
Про  __proto__ и prototype на практике
31:44
Dependency Injection basics- Fun Fun Function
22:26
Просмотров 153 тыс.
Lambda Calculus - Computerphile
12:40
Просмотров 1 млн