Find out how many items in an Array
-
I've recently picked up Fuze and have been working through the tutorials and had a question about knowing how many items are in an array in the for loop example which explicitly states:
for i = 0 to 5 loop
print( names[i] )
repeatCould you have something that would say 'for i = 0 to [number of array items]'? so that you could add more items to the array but not have to adjust the loop amount?
Hope that makes sense!
-
@eNDyGee Perfect sense. The len function
https://fuzearena.com/help/view/len
returns the length of a string or array so you can do
for i = 0 to len( names ) loop print( names[i] ) repeat
-
That's great - Thankyou!