Using Prototype Objects
This lesson teaches how to add properties and methods to an object prototype.
We'll cover the following
Adding Properties
We already discussed why properties could be added to the prototype object of a constructor function. Now let’ look at the method to do so.
Syntax
Here is how properties can be added to a constructor function using the prototype property:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy