![]() Topic awaiting preservation: Associative Arrays (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: USA |
![]() I know that the shortcut for defining an array is var foo = [bar, baz, quux, quuux, ... ]; and so forth. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() Well, foo["bar"] = "fred" is equivalent to foo.bar = "fred". So, what you're essentially doing is assigning property values to an object. |
Paranoid (IV) Inmate From: [s]underwater[/s] under-snow in Juneau |
![]() Commas work just fine for separating properties in new Object Literals. What I want to know is if they take up the same amount of memory (item for item) as an array. Anyone know? |
Paranoid (IV) Inmate From: USA |
![]() That does the trick exactly. Thanks, slime. |