"Richard Cornford" <richard@litotes.demon.co.uk> writes:
[color=blue]
> Yes, I got the wrong browser, it is Netscape 4 that does it wrong. It
> caused the problem in this thread:-
>
> <URL:
>
http://www.google.com/groups?threadm...30fa79f%40news.
> demon.co.uk >[/color]
Indeed. And Netscape 4 does return other enumerable properties of an array,
and they are strings. It is only the properties with names that are integers
in normal form (no prefixed zeros) that are converted and retained as numbers.
[color=blue]
> - I knew IE was connected with it but it was in fact the browsers on
> which the (erroneous) code was failing because IE was returning strings.
> (That was back in April so my memory of it was fading.)[/color]
Can't say much for mine at all, and I did write something in the thread :)
[color=blue]
> Not that I am saying that they shouldn't be strings. I only mentioned
> Arrays using integer indexes to highlight that they may not be the
> appropriate object type on which to be storing properties by name (given
> a standard object as an alternative).[/color]
Not that it matters. Netscape 4 also uses numbers for integer indicies
of objects. Personally, I think the K.I.S.S. principle is reason enough
not to use arrays if you don't need them.
/L
--
Lasse Reichstein Nielsen -
lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'