Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Address Book: My take

Just completed the Object-Oriented JavaScript course. It was very helpful! Here is my take on another challenge proposed - an address book. Of course, this solution is not production ready, but I have also learned a new way to remove items from existing array and much more.

Here is a snapshot

Now I do plan to add such functionality to the app: -add new contact (using forms probably?) -select contact on click

If someone could help me with guidance I would really appreciate that! Thank you all!

1 Answer

If your familiar with Jquery and how to manipulate the Dom, I would recommend learning about context. This will give you the dynamic functionality you need by applying the use of this.

Adding new contacts can be done by using a form. You can set up the form to submit to a server or have JavaScript handle that functionality for you. If you are looking to have JavaScript handle the form for you, then I would look into prototypal and classical programming theories.

Hope this helps a little on what you can look for.

Cool, thank you for the reply. I have just also spotted that I've missed the last part of Interactive Web Pages with JavaScript course. There is a great example of a "To-Do" project with pure JS, which handles new data entry easily. After finishing it I got more understanding on how I can improve the address book. The only tricky thing is now to start thinking in Object Oriented approach!