Best way to store a key=>value array in JavaScript?

What’s the best way to store a key=>value array in javascript, and how can that be looped through?

The key of each element should be a tag, such as {id} or just id and the value should be the numerical value of the id.

It should either be the element of an existing javascript class, or be a global variable which could easily be referenced through the class.

jQuery can be used.

7 Answers
7

Leave a Comment