Array: storage-------Index Storage
Dictionary, Object: storage---------Hash Storage
The difference: It can be said that their keys correspond to their respective references, but the index storage requires that key be 0,1,2 ... this is done by a positive integer of the sequence. What is the difference, there are many times, we need our own data is arranged according to a certain rule, rather than disorderly order; For example, the data of a leaderboard, we want its storage structure is ranked by rank, so generally use index storage (Array), why not hash storage, Because we need to sort every time we use it, this undoubtedly increases the sort time, which is the benefit of index storage in accordance with this requirement.
For ... in, for each: To be sure, all of their keys are stored in a data structure Struct_key (named arbitrarily), and all of the Value is stored in a data structure struct_value. For ... in, is the traversal of the Struct_key; For each is a traversal of the struct_value.
The study of Array, Dictionary, Object 3 Big data structure and for