title
JavaScript Video Tutorial Pt 3

description
Best JavaScript Book : http://goo.gl/zodRHD In this JavaScript Video Tutorial I will completely cover JavaScript Object Oriented Programming : Objects, Classes, Properties, Methods, Prototype, Encapsulation, Inheritance, Constructors, Method Overloading, Polymorphism. Code is Here: http://bit.ly/e7K6RN

detail
{'title': 'JavaScript Video Tutorial Pt 3', 'heatmap': [{'end': 54.964, 'start': 28.922, 'weight': 0.818}, {'end': 190.673, 'start': 136.756, 'weight': 0.756}, {'end': 593.959, 'start': 500.473, 'weight': 0.724}], 'summary': "Tutorial 'javascript video tutorial pt 3' covers object-oriented programming basics, object creation, method addition through prototypes, inheritance, method overloading, and dynamic creation of custom methods in javascript, with demonstrations of object creation and usage.", 'chapters': [{'end': 205.798, 'segs': [{'end': 65.173, 'src': 'heatmap', 'start': 28.922, 'weight': 0, 'content': [{'end': 35.628, 'text': 'An object just stores variables and the functions needed to manipulate those variables all in one place.', 'start': 28.922, 'duration': 6.706}, {'end': 41.054, 'text': 'A class defines what variables and functions each object will have.', 'start': 36.049, 'duration': 5.005}, {'end': 44.536, 'text': "Technically, JavaScript really doesn't have classes, though,", 'start': 41.334, 'duration': 3.202}, {'end': 48.619, 'text': "but we'll get into that if you have a background in object-oriented programming and other languages.", 'start': 44.536, 'duration': 4.083}, {'end': 54.964, 'text': 'Properties are the names given to variables that are stored inside of objects,', 'start': 48.819, 'duration': 6.145}, {'end': 60.808, 'text': 'and methods are the name that is provided to functions that are part of an object.', 'start': 54.964, 'duration': 5.844}, {'end': 65.173, 'text': 'So a variable, if it is stored in an object, is called a property.', 'start': 60.948, 'duration': 4.225}], 'summary': "Javascript doesn't have classes, objects store variables and functions, properties and methods defined.", 'duration': 64.988, 'max_score': 28.922, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus28922.jpg'}, {'end': 190.673, 'src': 'heatmap', 'start': 127.971, 'weight': 4, 'content': [{'end': 129.131, 'text': "so that's what I'm saying.", 'start': 127.971, 'duration': 1.16}, {'end': 131.513, 'text': 'every animal object should contain.', 'start': 129.131, 'duration': 2.382}, {'end': 132.933, 'text': "well, that's it right there.", 'start': 131.513, 'duration': 1.42}, {'end': 136.756, 'text': 'I just defined that guy, and this is what we call a constructor,', 'start': 132.933, 'duration': 3.823}, {'end': 142.179, 'text': 'and a constructor function is called every single time a new animal object is created.', 'start': 136.756, 'duration': 5.423}, {'end': 147.122, 'text': "again, if you're not quite getting it, don't worry, we're gonna go over this a bunch of times, three times actually.", 'start': 142.179, 'duration': 4.943}, {'end': 152.268, 'text': 'Now, what you want to do is you want to add the methods or functions needed for the class?', 'start': 147.805, 'duration': 4.463}, {'end': 156.712, 'text': 'And how you do that in JavaScript is through the use of what is called the prototype.', 'start': 152.589, 'duration': 4.123}, {'end': 161.996, 'text': 'So if I want to create a method that every single animal object is going to have.', 'start': 156.792, 'duration': 5.204}, {'end': 163.896, 'text': 'I have to tell you exactly this.', 'start': 162.295, 'duration': 1.601}, {'end': 168.44, 'text': 'The name of the object followed by the word prototype followed by set owner.', 'start': 164.257, 'duration': 4.183}, {'end': 174.465, 'text': 'And what this function is simply going to do is it is going to set the value for this variable right here.', 'start': 168.54, 'duration': 5.925}, {'end': 179.849, 'text': 'Then you call function and then a property that this function is going to accept.', 'start': 174.485, 'duration': 5.364}, {'end': 182.09, 'text': 'This is how you create methods in JavaScript.', 'start': 180.149, 'duration': 1.941}, {'end': 183.29, 'text': 'Kind of weird, I know.', 'start': 182.27, 'duration': 1.02}, {'end': 190.673, 'text': "Now what I'm going to do is I'm going to show you how to check to make sure that a new owner value has actually been passed.", 'start': 183.41, 'duration': 7.263}], 'summary': 'Javascript constructor functions and prototype for creating methods for animal objects.', 'duration': 62.702, 'max_score': 127.971, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus127971.jpg'}], 'start': 0.185, 'title': 'Javascript object-oriented programming basics and object creation', 'summary': 'Covers the basics of javascript object-oriented programming, including nomenclature and object creation, and emphasizes the addition of methods through prototypes, with a focus on error protection. the topic will be revisited multiple times.', 'chapters': [{'end': 102.607, 'start': 0.185, 'title': 'Javascript object-oriented programming basics', 'summary': 'Covers the basics of javascript object-oriented programming, including the nomenclature, creation of objects, and the differences in handling object-oriented programming compared to other languages.', 'duration': 102.422, 'highlights': ['JavaScript handles object-oriented programming in a way that is completely different than pretty much any other language.', 'An object in JavaScript stores variables and functions needed to manipulate those variables in one place.', "A class in JavaScript defines what variables and functions each object will have, although JavaScript technically doesn't have classes.", 'Properties are the names given to variables stored inside objects, and methods are the names provided to functions that are part of an object.']}, {'end': 205.798, 'start': 102.887, 'title': 'Javascript object creation and method addition', 'summary': 'Introduces creating and defining a constructor function for an animal object with default properties, and adding methods through the use of prototype in javascript, emphasizing the importance of error protection. the chapter also mentions the plan to revisit the topic multiple times.', 'duration': 102.911, 'highlights': ['Creating a constructor function for an animal object with default properties, such as name, sound, and owner, emphasizing the need for these properties with the intention to revisit the topic multiple times.', 'Explaining the use of prototype in JavaScript to add methods to every single animal object, with a specific example of setting an owner using the prototype followed by the method name, illustrating the process of creating methods in JavaScript.', 'Emphasizing the importance of error protection by checking if a new owner value has been passed, acknowledging the existence of multiple methods to achieve this but choosing a specific approach for demonstration.']}], 'duration': 205.613, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus185.jpg', 'highlights': ['JavaScript handles object-oriented programming differently from other languages.', 'An object in JavaScript stores variables and functions in one place.', 'A class in JavaScript defines variables and functions for each object, despite the absence of classes.', 'Properties are the names given to variables stored inside objects, and methods are the names provided to functions within an object.', 'Creating a constructor function for an animal object with default properties, intending to revisit the topic multiple times.', 'Using prototype in JavaScript to add methods to every animal object, exemplifying the process with setting an owner using the prototype.', 'Emphasizing error protection by checking if a new owner value has been passed when adding methods to objects.']}, {'end': 675.814, 'segs': [{'end': 231.859, 'src': 'embed', 'start': 205.798, 'weight': 0, 'content': [{'end': 214.698, 'text': "what I'm going to say is that I want the value of owner for this specific new animal object that's created to be set to the value that's been passed over.", 'start': 205.798, 'duration': 8.9}, {'end': 215.578, 'text': 'Right like that.', 'start': 214.978, 'duration': 0.6}, {'end': 223.145, 'text': 'Otherwise I want to warn the person and say to them please enter a valid owner.', 'start': 215.839, 'duration': 7.306}, {'end': 231.859, 'text': 'So this is how you create your first method using JavaScript, and the name of this method is going to be setOwner and what it simply does.', 'start': 223.605, 'duration': 8.254}], 'summary': "Creating a method 'setowner' in javascript to assign value to 'owner' for new animal object.", 'duration': 26.061, 'max_score': 205.798, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus205798.jpg'}, {'end': 410.52, 'src': 'embed', 'start': 381.378, 'weight': 2, 'content': [{'end': 385.701, 'text': "And then these methods, what you're doing is you're assigning them to this guy.", 'start': 381.378, 'duration': 4.323}, {'end': 390.964, 'text': 'So the new dog object that you just created is going to automatically have a name, a sound and an owner,', 'start': 385.761, 'duration': 5.203}, {'end': 399.309, 'text': 'and also have access to all of these different functions to both set, as well as get access to all of these different properties inside here.', 'start': 390.964, 'duration': 8.345}, {'end': 405.371, 'text': "And then what I'm going to do, since the object's been created, is I'm going to call the method setName.", 'start': 399.921, 'duration': 5.45}, {'end': 410.52, 'text': "And I'm going to pass it some attributes that I want set for this specific dog object.", 'start': 405.391, 'duration': 5.129}], 'summary': 'Methods assigned to new dog object for automatic property access and function use.', 'duration': 29.142, 'max_score': 381.378, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus381378.jpg'}, {'end': 492.929, 'src': 'embed', 'start': 470.104, 'weight': 1, 'content': [{'end': 478.69, 'text': 'okay, great inheritance is, whenever you create a new object that inherits all the properties and methods that you defined in another object,', 'start': 470.104, 'duration': 8.586}, {'end': 479.891, 'text': 'it just borrows them.', 'start': 478.69, 'duration': 1.201}, {'end': 481.532, 'text': 'and how you do it is.', 'start': 479.891, 'duration': 1.641}, {'end': 489.668, 'text': "you just use the function keyword again and let's say I want to make a cat this time and I just want to create one additional property called mood.", 'start': 481.532, 'duration': 8.136}, {'end': 492.929, 'text': "and I'm just going to say happy, because all cats are always happy.", 'start': 489.668, 'duration': 3.261}], 'summary': "Inheritance allows objects to borrow properties and methods. creating a new cat with an additional 'mood' property, set to 'happy'.", 'duration': 22.825, 'max_score': 470.104, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus470104.jpg'}, {'end': 593.959, 'src': 'heatmap', 'start': 500.473, 'weight': 0.724, 'content': [{'end': 511.458, 'text': 'what you need to do whenever you are going to inherit all the properties and methods created in the animal class is start off with the class that you want to inherit from,', 'start': 500.473, 'duration': 10.985}, {'end': 514.22, 'text': 'followed with a dot, and then call, And then this', 'start': 511.458, 'duration': 2.762}, {'end': 517.121, 'text': "And I'm going to get a little bit more into what this is.", 'start': 514.659, 'duration': 2.462}, {'end': 522.525, 'text': 'What this is is a reference to the next cat object that you create.', 'start': 517.361, 'duration': 5.164}, {'end': 523.467, 'text': "That's what this is.", 'start': 522.586, 'duration': 0.881}, {'end': 524.748, 'text': "That's what this stands for.", 'start': 523.567, 'duration': 1.181}, {'end': 530.632, 'text': 'And what this is here is a call to the constructor that you created, the animal constructor,', 'start': 524.848, 'duration': 5.784}, {'end': 535.296, 'text': "which is just the function that's run every single time you create a new animal object.", 'start': 530.632, 'duration': 4.664}, {'end': 541.565, 'text': 'So automatically, this is the way that all your cat objects are now going to have names, sounds, and owners, even though you do not define them.', 'start': 535.576, 'duration': 5.989}, {'end': 546.692, 'text': "And they're also going to have set owners and get owners and so forth in regards to methods automatically.", 'start': 541.585, 'duration': 5.107}, {'end': 549.702, 'text': 'But you have to make sure that you call this specific function.', 'start': 546.96, 'duration': 2.742}, {'end': 554.326, 'text': 'This is actually forcing the original animal constructor to be executed.', 'start': 549.802, 'duration': 4.524}, {'end': 555.467, 'text': "That's what's going on there.", 'start': 554.486, 'duration': 0.981}, {'end': 563.293, 'text': 'Then what you have to do is actually set the animal class as the superclass for the object or class called cat.', 'start': 555.587, 'duration': 7.706}, {'end': 566.496, 'text': 'And how you do that is just follow this guy.', 'start': 563.854, 'duration': 2.642}, {'end': 570.419, 'text': 'Cat prototype is equal to new animal.', 'start': 566.696, 'duration': 3.723}, {'end': 578.053, 'text': "And if you didn't do this, what this would do is it would actually make cat a subclass of the main object superclass, which I'm not gonna get into.", 'start': 570.619, 'duration': 7.434}, {'end': 580.554, 'text': 'this stuff can get really complicated, really really easy.', 'start': 578.053, 'duration': 2.501}, {'end': 582.115, 'text': "so I'm just gonna stick with that.", 'start': 580.554, 'duration': 1.561}, {'end': 586.537, 'text': "and then you're also gonna have to assign the right constructor to this object,", 'start': 582.115, 'duration': 4.422}, {'end': 590.578, 'text': 'and the constructor for the cat object is gonna be this one in JavaScript.', 'start': 586.537, 'duration': 4.041}, {'end': 593.959, 'text': 'you have to actually define that and again a reference to cat prototype.', 'start': 590.578, 'duration': 3.381}], 'summary': 'In javascript, inheriting properties and methods from a superclass involves referencing the superclass, calling its constructor, setting it as the superclass for the new class, and assigning the correct constructor.', 'duration': 93.486, 'max_score': 500.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus500473.jpg'}], 'start': 205.798, 'title': 'Javascript object creation and inheritance', 'summary': 'Covers creating objects in javascript, including the method setowner and encapsulation, and explains inheritance, adding new methods and properties, with demonstrations of creating and using objects like dog and cat.', 'chapters': [{'end': 414.426, 'start': 205.798, 'title': 'Javascript object creation and method usage', 'summary': 'Covers the creation of an object in javascript, including the method setowner and the concept of encapsulation, showing how to create and use methods to set and get different properties of an object, with a demonstration of creating and using a dog object.', 'duration': 208.628, 'highlights': ['The chapter covers the creation of an object in JavaScript, including the method setOwner and the concept of encapsulation, showing how to create and use methods to set and get different properties of an object, with a demonstration of creating and using a dog object.', 'The method setOwner is created to set the owner for the specific object, with a warning message if a valid owner is not entered.', 'Encapsulation in JavaScript is discussed, where functions are used to change the value of properties inside the object, requiring the use of specific functions like setOwner to modify the properties.', 'Demonstration of creating a dog object, assigning properties, and accessing methods to set and get different properties inside the object.']}, {'end': 675.814, 'start': 414.866, 'title': 'Javascript inheritance and object creation', 'summary': 'Explains how to create objects in javascript, inherit properties and methods from another object, and add new methods and properties, with an example of creating a new cat object named sophie with specified properties and methods.', 'duration': 260.948, 'highlights': ['The chapter demonstrates creating objects in JavaScript, including defining properties like name, sound, and owner, and utilizing methods like set name and get name. It also shows the default value for properties if not defined.', "It explains inheritance in JavaScript, showcasing how to inherit properties and methods from another object using the 'prototype' method, and how to add new methods and properties to the inherited object, with an example of creating a new cat object named Sophie with specified properties and methods.", 'The detailed explanation includes defining the constructor for the inherited object, assigning the right constructor to the object, and adding new methods like get mood and set mood to the inherited object, providing an example of creating a new cat object named Sophie with specified properties and methods.']}], 'duration': 470.016, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus205798.jpg', 'highlights': ['The chapter covers the creation of an object in JavaScript, including the method setOwner and the concept of encapsulation, showing how to create and use methods to set and get different properties of an object, with a demonstration of creating and using a dog object.', "It explains inheritance in JavaScript, showcasing how to inherit properties and methods from another object using the 'prototype' method, and how to add new methods and properties to the inherited object, with an example of creating a new cat object named Sophie with specified properties and methods.", 'Demonstration of creating a dog object, assigning properties, and accessing methods to set and get different properties inside the object.', 'The method setOwner is created to set the owner for the specific object, with a warning message if a valid owner is not entered.']}, {'end': 1090.274, 'segs': [{'end': 724.015, 'src': 'embed', 'start': 675.994, 'weight': 1, 'content': [{'end': 688.26, 'text': 'Another thing you can do with object-oriented programming in JavaScript is to actually check if one object was instantiated or was created in a way based off of another class.', 'start': 675.994, 'duration': 12.266}, {'end': 690.434, 'text': "that's what that means.", 'start': 688.854, 'duration': 1.58}, {'end': 691.175, 'text': "and let's say,", 'start': 690.434, 'duration': 0.741}, {'end': 702.718, 'text': "I want to see if Sophie is an instance of that's how you figure out if Sophie is actually a cat object and you can see the true came back here on the right side of the screen,", 'start': 691.175, 'duration': 11.543}, {'end': 708.319, 'text': "because what is really weird and on what will actually confuse you document right like, let's say, we call,", 'start': 702.718, 'duration': 5.601}, {'end': 716.387, 'text': 'type of which is supposed to return what type of data type this is well, If you thought that whenever you type this in,', 'start': 708.319, 'duration': 8.068}, {'end': 719.41, 'text': 'you were going to be presented with class, you would be wrong.', 'start': 716.387, 'duration': 3.023}, {'end': 720.371, 'text': "It's actually a function.", 'start': 719.47, 'duration': 0.901}, {'end': 724.015, 'text': "Why? Because that's what it's called inside of JavaScript.", 'start': 720.652, 'duration': 3.363}], 'summary': "Object-oriented programming in javascript can involve checking if an object is an instance of a particular class, with 'true' indicating a match.", 'duration': 48.021, 'max_score': 675.994, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus675994.jpg'}, {'end': 782.816, 'src': 'embed', 'start': 751.934, 'weight': 3, 'content': [{'end': 757.196, 'text': "If you have no idea what it is, or this is the first tutorial you've ever seen on it, some other things are going to be confusing.", 'start': 751.934, 'duration': 5.262}, {'end': 758.677, 'text': 'So I leave you with that.', 'start': 757.376, 'duration': 1.301}, {'end': 764.345, 'text': 'Another concept in object-oriented programming is what is called method overloading.', 'start': 759.542, 'duration': 4.803}, {'end': 766.987, 'text': 'What method overloading is.', 'start': 764.585, 'duration': 2.402}, {'end': 775.332, 'text': 'normally, you can create multiple different versions or multiple different methods that all have a different number of attributes.', 'start': 766.987, 'duration': 8.345}, {'end': 782.816, 'text': "And the programming language if it follows the basic principles of object-oriented programming, We'll call the write method,", 'start': 775.692, 'duration': 7.124}], 'summary': 'Introduction to method overloading in object-oriented programming.', 'duration': 30.882, 'max_score': 751.934, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus751934.jpg'}, {'end': 873.221, 'src': 'embed', 'start': 845.061, 'weight': 0, 'content': [{'end': 851.886, 'text': 'What you have to understand is inside a JavaScript, you can ask for these different properties, and if they are not passed, an error is not thrown.', 'start': 845.061, 'duration': 6.825}, {'end': 857.35, 'text': 'Well, then, what you can do is actually create new versions of this method,', 'start': 852.026, 'duration': 5.324}, {'end': 864.635, 'text': 'based off of which attributes were sent and how you would do that is using this in my situation here.', 'start': 857.35, 'duration': 7.285}, {'end': 866.196, 'text': "I'm using type of to do this.", 'start': 864.635, 'duration': 1.561}, {'end': 873.221, 'text': "so I'm going to say is new name defined, and I'm going to continue to do this for all of these properties that could be sent,", 'start': 866.196, 'duration': 7.025}], 'summary': 'In javascript, new versions of methods can be created based on sent attributes using type of.', 'duration': 28.16, 'max_score': 845.061, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus845061.jpg'}, {'end': 981.432, 'src': 'embed', 'start': 947.851, 'weight': 4, 'content': [{'end': 950.934, 'text': 'And the final thing is what is called polymorphism.', 'start': 947.851, 'duration': 3.083}, {'end': 959.782, 'text': 'What you have to understand in regards to polymorphism is that, because JavaScript is loosely typed, polymorphism is possible,', 'start': 951.214, 'duration': 8.568}, {'end': 966.949, 'text': "but it's extremely different in regards to its usage in comparison to other object-oriented programming languages.", 'start': 959.782, 'duration': 7.167}, {'end': 972.581, 'text': "And just to explain exactly how polymorphism works in most programming languages, like, let's say,", 'start': 967.289, 'duration': 5.292}, {'end': 981.432, 'text': "you create a function this time doesn't have anything to do with the actual objects or anything and you define this is the way it works in most languages,", 'start': 972.581, 'duration': 8.851}], 'summary': 'Polymorphism in javascript is possible due to its loosely typed nature, but its usage differs significantly from other object-oriented programming languages.', 'duration': 33.581, 'max_score': 947.851, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus947851.jpg'}, {'end': 1015.937, 'src': 'embed', 'start': 993.27, 'weight': 5, 'content': [{'end': 1001.733, 'text': 'Well, in most programming languages, the way it works is because cat inherited all of its properties and so forth from animal.', 'start': 993.27, 'duration': 8.463}, {'end': 1011.055, 'text': 'what you would be able to do in other languages is to pass the cat object, even though it is expecting an animal object to be passed,', 'start': 1001.733, 'duration': 9.322}, {'end': 1013.256, 'text': 'and it would automatically just work.', 'start': 1011.055, 'duration': 2.201}, {'end': 1015.937, 'text': "And it would come in here, and let's just copy this.", 'start': 1013.596, 'duration': 2.341}], 'summary': 'In most programming languages, cat inherits properties from animal, allowing cat objects to work as animal objects in other languages.', 'duration': 22.667, 'max_score': 993.27, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus993270.jpg'}], 'start': 675.994, 'title': 'Object-oriented programming in javascript and method overloading', 'summary': 'Covers checking object instantiation, data type confusion, and method overloading in javascript, as well as dynamic creation of custom methods and differences in polymorphism.', 'chapters': [{'end': 808.065, 'start': 675.994, 'title': 'Object-oriented programming in javascript', 'summary': 'Covers the concept of checking object instantiation, the confusion between data types in javascript, and method overloading in object-oriented programming.', 'duration': 132.071, 'highlights': ['The concept of checking object instantiation Explains how to check if an object was instantiated based off another class in JavaScript.', 'Confusion between data types in JavaScript Discusses the confusion between data types and the unexpected return values when using type checking methods in JavaScript.', 'Method overloading in object-oriented programming Explains the concept of method overloading, allowing for multiple methods to be called based on the number of attributes sent in object-oriented programming.']}, {'end': 1090.274, 'start': 808.225, 'title': 'Javascript method overloading and polymorphism', 'summary': 'Discusses method overloading in javascript by dynamically creating custom methods based on the properties sent, and explains the differences in polymorphism between javascript and other object-oriented programming languages.', 'duration': 282.049, 'highlights': ['JavaScript allows method overloading by dynamically creating custom methods based on the properties sent, using type of to check for undefined properties, and the last version of the function with the specific name takes precedence.', 'Polymorphism in JavaScript is different from other object-oriented programming languages as it is possible due to loose typing, but lacks the same behavior of automatically using the right methods when passing objects of inherited types.', 'Other object-oriented programming languages allow passing inherited objects to functions expecting the base type, automatically executing the right methods, unlike JavaScript which lacks this behavior due to loose typing.']}], 'duration': 414.28, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/xVnW7ZMqBus/pics/xVnW7ZMqBus675994.jpg', 'highlights': ['JavaScript allows method overloading by dynamically creating custom methods based on the properties sent, using type of to check for undefined properties, and the last version of the function with the specific name takes precedence.', 'The concept of checking object instantiation Explains how to check if an object was instantiated based off another class in JavaScript.', 'Confusion between data types in JavaScript Discusses the confusion between data types and the unexpected return values when using type checking methods in JavaScript.', 'Method overloading in object-oriented programming Explains the concept of method overloading, allowing for multiple methods to be called based on the number of attributes sent in object-oriented programming.', 'Polymorphism in JavaScript is different from other object-oriented programming languages as it is possible due to loose typing, but lacks the same behavior of automatically using the right methods when passing objects of inherited types.', 'Other object-oriented programming languages allow passing inherited objects to functions expecting the base type, automatically executing the right methods, unlike JavaScript which lacks this behavior due to loose typing.']}], 'highlights': ['JavaScript handles object-oriented programming differently from other languages.', 'An object in JavaScript stores variables and functions in one place.', 'A class in JavaScript defines variables and functions for each object, despite the absence of classes.', 'Properties are the names given to variables stored inside objects, and methods are the names provided to functions within an object.', 'Creating a constructor function for an animal object with default properties, intending to revisit the topic multiple times.', 'Using prototype in JavaScript to add methods to every animal object, exemplifying the process with setting an owner using the prototype.', 'Emphasizing error protection by checking if a new owner value has been passed when adding methods to objects.', 'The chapter covers the creation of an object in JavaScript, including the method setOwner and the concept of encapsulation, showing how to create and use methods to set and get different properties of an object, with a demonstration of creating and using a dog object.', "It explains inheritance in JavaScript, showcasing how to inherit properties and methods from another object using the 'prototype' method, and how to add new methods and properties to the inherited object, with an example of creating a new cat object named Sophie with specified properties and methods.", 'Demonstration of creating a dog object, assigning properties, and accessing methods to set and get different properties inside the object.', 'The method setOwner is created to set the owner for the specific object, with a warning message if a valid owner is not entered.', 'JavaScript allows method overloading by dynamically creating custom methods based on the properties sent, using type of to check for undefined properties, and the last version of the function with the specific name takes precedence.', 'The concept of checking object instantiation Explains how to check if an object was instantiated based off another class in JavaScript.', 'Confusion between data types in JavaScript Discusses the confusion between data types and the unexpected return values when using type checking methods in JavaScript.', 'Method overloading in object-oriented programming Explains the concept of method overloading, allowing for multiple methods to be called based on the number of attributes sent in object-oriented programming.', 'Polymorphism in JavaScript is different from other object-oriented programming languages as it is possible due to loose typing, but lacks the same behavior of automatically using the right methods when passing objects of inherited types.', 'Other object-oriented programming languages allow passing inherited objects to functions expecting the base type, automatically executing the right methods, unlike JavaScript which lacks this behavior due to loose typing.']}