
09-02-2009
|
|
|
|
Re: wrong detect array length
On Aug 19, 4:11*pm, C A Upsdell <""cupsdell\"@nos...@upsdell.com">
wrote:
> Max wrote:
> > (javascript)
> > if create array by:
> > ~~~~~~~~~~~
> > var arr = [1, 2, 3,];
> > ~~~~~~~~~~~
> > it will containt 3 elements, but "length"-property will contain number 4,
> > because the last comma. This is bug. Other browsers ignore it.
>
> > Can you fix it?
>
> What, you want Microsoft to remove your comma for you? *How many more of
> your bugs do you want Microsoft to fix?
That's stupid - having a comma on the end shouldn't create a new array
element
It doesn't do it in other languages (PHP, Python, etc. etc.) and other
browsers implementations of Javascript
|