...

View Full Version : the array length



Kor
10-28-2003, 09:09 AM
For some reasons I don't want to specify the lenght of an array, but I need later to use that value. Is it possible?

var a = new Array()
a[0] =
a[1] =
a[2] =

I need something like a.lenght to use this value in an incremental loop...

for(i=0;i++;i<a.lenght)...

Roelf
10-28-2003, 09:21 AM
Originally posted by Kor
For some reasons I don't want to specify the lenght of an array, but I need later to use that value. Is it possible?

var a = new Array()
a[0] =
a[1] =
a[2] =

I need something like a.lenght to use this value in an incremental loop...

for(i=0;i++;i<a.lenght)...
for(i=0;i++;i<a.length) {

}
should do the trick

glenngv
10-28-2003, 09:24 AM
it should be

for(i=0;i<a.length;i++)

not

for(i=0;i++;i<a.length)

Kor
10-28-2003, 09:38 AM
thank you



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum