Topic awaiting preservation: Associative Arrays (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: USA |
posted 07-17-2004 05:56
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 |
posted 07-17-2004 07:57
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 |
posted 07-17-2004 08:26
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 |
posted 07-17-2004 16:20
That does the trick exactly. Thanks, slime. |