Master JavaScript Objects
#javascript #object #software #webdevelopment Hello, I am back with a new video. Objects and Object-oriented programming in JavaScript are complex topics with a lot of information to know, it usually takes days to learn about objects. So the goal of this video is to compact days of training into a few minutes. You will learn about objects, properties, attributes, inheritance, prototype and constructors. You will learn about Classes in my next video! Cheatcheet/mindmap: https://ko-fi.com/s/34966c8fb1 Shop: https://ko-fi.com/computerbread/shop Follow me on twitter: https://twitter.com/ComputerBread Subscribe: https://www.youtube.com/@ComputerBread?sub_confirmation=1 Video about JS Class: https://youtu.be/ATNPDFSHgns JavaScript playlist: https://www.youtube.com/playlist?list=PLuJfrVx3aQbGQMDbtGcuIDY2892FA09b2 Timestamps: 0:00 Introduction 0:27 Data types 0:38 Object 1:08 Attributes 2:08 Create Objects: the hard way 3:57 Traversing Objects 6:41 Accessor property 8:15 "this" 9:12 Create Objects: the easy way 10:55 Check if a property exists 11:07 Order of properties 12:02 Method definition 12:42 [[Prototype]] 15:09 Inheritance 16:27 Prototype chain 18:39 Inheritance example 21:58 Constructors 27:12 Conclusion A few notes: - Prerequisites: you should know about JavaScript variables & functions, prior knowledge in objects is not required but will help - I tried to make the video beginner friendly while still talking about advanced concepts, some parts may be a bit difficult - Some explanations (like how the new operator works) should be considered “mental model” more than what’s really happening, reading the specification being difficult and the actual implementation being engine-dependent, I created some approximations/representations that can be considered inaccurate - The part on “this” is very short, “this” can be very confusing in JavaScript. To clarify a bit, the value of “this” depends on the context at runtime, when you use “method invocation”, like “obj.method()”, “this” inside the body of “method” will refer to “obj”. Note that the value of “this” can be lost. You can also decide what value “this” should have with “Function.prototype.apply()”, “Function.prototype.call()” or “Function.prototype.bind()” - Some part of the audio are a bit scuffed, I re-recorded some part with a different set up - My pronunciation & voice are not the best, I could pay someone to read the script for me, but I am trying to get better at speaking English, so I am sorry if you struggle understanding me sometimes, but I am not sorry for trying to get better - sources: - https://javascript.info/ - https://developer.mozilla.org/en-US/ - https://tc39.es/ecma262/ Keywords: Object, Objects, JavaScript, ES6, Prototype, Inheritance, constructor, descriptors, attributes, properties, class
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.