November 2012
Intermediate to advanced
240 pages
4h 50m
English
Objects are JavaScript’s most versatile data structure. Depending on the situation, an object can represent a fixed record of name-value associations, an object-oriented data abstraction with inherited methods, a dense or sparse array, or a hash table. Naturally, mastering such a multipurpose tool demands different idioms for different needs. In the preceding chapter we studied the use of structured objects and inheritance. This chapter tackles the use of objects as collections: aggregate data structures with varying numbers of elements.
At its heart, a JavaScript object is a table mapping string property names to values. This makes objects pleasantly ...
Read now
Unlock full access