1
00:00:00,330 --> 00:00:01,240
So how did you do.

2
00:00:01,500 --> 00:00:03,770
Here's a solution for the previous problem.

3
00:00:03,900 --> 00:00:09,270
I'm placing all of the properties that I do not want shared for each object inside of the constructor

4
00:00:09,270 --> 00:00:15,930
function and moving all of my functions that I want each object to have inside the vehicle prototype

5
00:00:15,920 --> 00:00:16,830
.

6
00:00:16,860 --> 00:00:20,450
If you didn't get this one watch the previous couple of videos and try it again.

7
00:00:20,460 --> 00:00:22,200
This stuff takes practice.

8
00:00:22,440 --> 00:00:23,490
To summarize.

9
00:00:23,490 --> 00:00:29,190
We saw that every time the new keyword is used a dunder Prato property is added to the object created

10
00:00:29,220 --> 00:00:31,740
from the constructor function.

11
00:00:31,870 --> 00:00:37,380
The Dondre produce property links the object created from the constructor function to the prototype

12
00:00:37,380 --> 00:00:39,960
property on the constructor function.

13
00:00:39,960 --> 00:00:45,720
This link allows objects created from the constructor function to access methods and properties on the

14
00:00:45,720 --> 00:00:47,520
prototype object.

15
00:00:47,730 --> 00:00:53,310
The prototype property also contains a property called constructor which points back to the constructor

16
00:00:53,310 --> 00:00:54,390
function.

17
00:00:54,390 --> 00:01:00,240
Finally we should always strive to place properties and methods that we want to share among all of our

18
00:01:00,240 --> 00:01:03,600
objects created from a constructor in the prototype.

19
00:01:03,720 --> 00:01:09,750
As these properties and methods only need to be defined once and not redefined for every single object

20
00:01:09,750 --> 00:01:11,580
.

21
00:01:11,580 --> 00:01:14,560
Thanks again for watching the series on object oriented programming.

22
00:01:14,850 --> 00:01:18,010
As always if you have any questions be sure to let us know.

23
00:01:18,040 --> 00:01:19,670
We're always here to help.

24
00:01:19,680 --> 00:01:21,340
Thanks again and I'll see you soon.
