Prototype Objects
This lesson explains the prototype objects, what they are, how they are accessed and why they are used to add properties.
We'll cover the following
In the previous lesson, we asked the question regarding whether there was a simpler approach for adding new methods/properties to a constructor function. This introduces us to the very major concept of “Prototype Objects” in Javascript.
Before we get into how it can be used, let’s discuss what a prototype is.
Prototype Properties in Objects
Instead of jumping directly into the definition, let’s begin by looking at the code below:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy