gerreno.blogg.se

What is js prototype
What is js prototype







what is js prototype what is js prototype

Then we'll build code for the user interface together in upcoming lessons. We'll focus only on the business logic for now. And because all Contacts should have the same combination of properties (name, phone number, etc.) we'll create a constructor that can quickly craft many different Contact objects with this same structure. Since each contact will have multiple properties, we will use Contact objects to encapsulate their data. The first classwork of this section will prompt you to recreate this project. Take note that you do not have to code along with these lessons, but you can if you want to.

what is js prototype

Now that we have an understanding of JavaScript objects, constructors, and prototypes, let's put them to work! In the next few lessons, we'll build an address book app to store contact info for our friends.









What is js prototype