[GDScript/en] add example of iterating over an int with for

This commit is contained in:
zacryol 2022-02-14 08:58:43 -07:00
parent 2f05725cc0
commit 6a600f7120

View File

@ -114,6 +114,9 @@ func control_flow():
for i in range(20): # GDScript's range is similar to Python's
print(i) # so this will print numbers from 0 to 19
for i in 20: # unlike Python, you can loop over an int directly
print(i) # so this will also print numbers from 0 to 19
for i in ["two", 3, 1.0]: # iterating over an array
print(i)