well ever array has the attribute array.length this will return the arrays length. However, remember that if it returns 4 then the array only has elements:
0 1 2 and 3
NOT 4
If you were to use a for loop you would need to use this attribute to set the number of iterations that the for loop does. Otherwise you would get the out of bounds excpetions