On Nov 14, 11:06 am, Attila Szegedi <[EMAIL PROTECTED]> wrote:
> On 2008.11.14., at 10:58, Hannes Wallnoefer wrote:
>
> > It is true
> > that some of it is quirky, e.g getIds() returning strings for array
> > indices, but that's actually based on the ES spec IIRC.
>
> Where does it do that? getIds() on NativeArray returns  
> java.lang.Integer instances, not java.lang.String.
>
> Attila.

Sorry, I took David's word for it. But it sounded plausible to me
because in a JavaScript for-in loop, array indices _are_ enumerated as
strings. I remember vaguely finding an ES-spec based explanation for
that once, but I can't remember it, unfortunately :-)

js> var x = [1, 2, 3];
1,2,3
js> for (var i in x) print(typeof i, i);
string 0
string 1
string 2
js>

hannes
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to