[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2014-01-09
3
Medium Priority
?
354 Views
Last Modified: 2014-01-16
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.
0
Comment
Question by:RajG1978
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39769797
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.
0
 
LVL 9

Accepted Solution

by:
Sar1973 earned 1000 total points
ID: 39770656
You could create an array with 4 columns/fields, and use the push and the remove methods to add and delete items. See http://www.w3schools.com/js/js_obj_array.asp
0
 
LVL 43

Assisted Solution

by:Rob
Rob earned 1000 total points
ID: 39773156
Please have a read of this article http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_12264-Javascript-Frameworks-what-are-they.html
It outlines a basic framework but also the basics of class creation and instantiation
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question