"Andreas Neumann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Later on I use a "for ... in" loop to extract the values of the
associative
> array.
This isn't really safe, because things in the prototype also can get
enumerated so if I do:
Array.prototype.chicken=function() {alert('a') }
n=[]
n['a']=1
for (i in n) alert(i)
will alert a and chicken
> It appears that the Rhino js engine automatically sorts alphabetically
> according to the index value, which means, that "Asians" come first, then
"
> Blacks", ....
Perfectly valid behaviour, there's no reliability on the ordering, it's
implementation specific, I'd recommend rewriting to avoid needing for i in a
syntax.
Jim.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]