Forum Moderators: open

Message Too Old, No Replies

array functions

is there a function to get size of the array

         

icpooreman

1:32 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



hey is there a sizeof function in javascript and does it have a foreach loop or something that will let me traverse an array.

Tidal2

1:50 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



For arrays this should work and step through all the entries in the array.

desc = new Array ("a","b","c","d")

for (i=0; i<desc.length; i++) {
.... your code ...
}