[Dojo-interest] Type of...

Rhapidophyllum rhapidophyllum at cox.net
Tue Feb 27 15:48:49 MST 2007


Actually, it is an object that can be accessed with associative array  
syntax as well as object syntax:

x["a"]
x.a

On Feb 27, 2007, at 4:30 PM, Rui Gamito wrote:

> The name is associative array, and you are right... it is a very  
> basic concept!
> My bad (I was dead tired of coding and debugging!!!! The Javascript
> reference is a good idea though :))
>
> Thanks
> RG.
>
> On 2/27/07, Rob Kinyon <rob.kinyon at gmail.com> wrote:
>> x is an object and you can go through the list of keys with  
>> foreach as in
>>     foreach ( var key in object ) {
>>         var value = object[key];
>>     }
>>
>> These are very basic javascript concepts. Might I suggest you find a
>> Javascript reference guide and read through it?
>>
>> Thanks,
>> Rob
>>
>> On 2/27/07, Rui Gamito <atrium601 at gmail.com> wrote:
>> > What exactly is the type of x in:
>> >
>> > var x = {a: 1, b: 2, c: 3};
>> >
>> > and how can I sweep through all the key:value pairs?
>> > _______________________________________________
>> > Dojo FAQ: http://dojo.jot.com/FAQ
>> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>> > Dojo-interest at dojotoolkit.org
>> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
>> >
>> _______________________________________________
>> Dojo FAQ: http://dojo.jot.com/FAQ
>> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>> Dojo-interest at dojotoolkit.org
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest



More information about the Dojo-interest mailing list