|
|
|
|
|
by tsimionescu
1993 days ago
|
|
In JS semantics, lists (by which I assume you actually mean arrays) are just objects with numeric keys. Nothing special about them, except that there are certain functions which assume the objects they take in have only numeric keys starting from 0 and always increasing (they usually ignore non-numeric keys that those objects might have). This is similar to LISP, where you can build many kinds of structures out of cons cells, and you have certain families of functions that assume that the cons cells you pass in have certain kinds of structures, defining lists or trees or association lists etc. |
|