These are the steps I would suggest. Take time to learn it. I feel a course or a book is important so you aren't just learning parts. Then work on projects. Challenge yourself. Finally, always continue learning. Never stop learning new things about JavaScript all through this process.
If you create many objects from a function constructor, each instance will designate memory for the attributes and methods. Instead of recreating the same method for every instance, all instances can find the method by looking at the prototype object. All instances share the same __proto__. Thus, this reduces the space for methods from n number of instances to 1.
Later in the video I show an example of a class even though I'm not a fan of the class structure. It is simply syntactic sugar that masks the use of prototypes.
Great video once again! Thank you for your time
Hi, how you become master in javascript various concepts sir?
These are the steps I would suggest. Take time to learn it. I feel a course or a book is important so you aren't just learning parts. Then work on projects. Challenge yourself. Finally, always continue learning. Never stop learning new things about JavaScript all through this process.
@@AllThingsJavaScript is there a book(s) you recommend?
@@2004helloWorld My favorite books can be seen at the bottom of my site: allthingsjavascript.com
I don't see you explain why this reduce memory
Not sure I understand the question.
If you create many objects from a function constructor, each instance will designate memory for the attributes and methods. Instead of recreating the same method for every instance, all instances can find the method by looking at the prototype object. All instances share the same __proto__. Thus, this reduces the space for methods from n number of instances to 1.
👍👍👍
Basically when you want to extend the "class" functionality
you should use a class instead
Later in the video I show an example of a class even though I'm not a fan of the class structure. It is simply syntactic sugar that masks the use of prototypes.
@@AllThingsJavaScript +1