[thelist] [javascript] object literal question

Matt Warden mwarden at gmail.com
Wed Mar 8 23:11:04 CST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

liorean wrote:
> On 08/03/06, m.milicevic <me at machak.com> wrote:
> 
>>you could also use associative arrays
> 
> 
> That's what an object literal is. All objects are in effect
> associative arrays in JavaScript.

Not quite. Object properties are implemented as an associative array (as
they are in many languages, whether the languages expose that fact to
the programmer or not), but an object is not an array (but, of course,
an array is an object).

I think you meant this, because you said:

> There's no need to use an array if
> you aren't taking advantage of the array specific methods and
> behaviors, especially the dynamically changing length property.

but I just wanted to clear that up in case anyone else is listening :)


- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFED7jorI3LObhzHRMRAuSiAKDv9EI05enqP1Xey+6ahpSRsdyxFgCfbNDU
tz3urPLPs8hXCooAfdbBahQ=
=pqFl
-----END PGP SIGNATURE-----



More information about the thelist mailing list