[thelist] Q on assoc arrays

Diane Soini dianesoini at earthlink.net
Sun Dec 14 14:58:48 CST 2003


Maybe this will help. Has info on javascript hashtables.

http://www.crockford.com/javascript/survey.html

On Sunday, December 14, 2003, at 12:00 AM, 
thelist-request at lists.evolt.org wrote:

> In Perl I can do this...
>
>   ( 'ac' -> 'Ascension Island',
>     'ad' -> 'Andorra',
>     'ae' -> 'United Arab Emirates',
>     'af' -> 'Afghanistan'
>   )
>
> Does any one know if JavaScript has a similar "feature"?
> I would rather not have to do...
>
>    myArray['ac'] = 'Ascension Island';
>    myArray['ad'] = 'Andorra';
>    myArray['ae'] = 'United Arab Emirates';
>    myArray['af'] = 'Afghanistan';
>
> Just me being picky.
>
> Thanks
>
> Walter



More information about the thelist mailing list