How to create javascript class and store input values in memory?

How can I create a class Person, with the fields firstname, lastname, age and zipcode. I need to store a large collection of these Person objects in memory. I need to be able to add and delete items, in addition to being able to sort and search by any of the fields.  How can use  Javascript to demonstrate how you would accomplish this.
Can you please describe a memory and performance efficient data structure and mechanism to accomplish this.
Who is Participating?
Sar1973Connect With a Mentor Commented:
You could create an array with 4 columns/fields, and use the push and the remove methods to add and delete items. See
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
This sounds like homework and we are not allowed to answer these types of questions.  If you can present us with some code we can help point you in the right direction.
RobConnect With a Mentor Owner (Aidellio)Commented:
Please have a read of this article
It outlines a basic framework but also the basics of class creation and instantiation
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.