mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Update @GDScript.xml range docs to iterate backwards.
This commit is contained in:
parent
6d7413be74
commit
bcce315a9a
@ -227,8 +227,8 @@
|
||||
To iterate over an [Array] backwards, use:
|
||||
[codeblock]
|
||||
var array = [3, 6, 9]
|
||||
for i in range(array.size(), 0, -1):
|
||||
print(array[i - 1])
|
||||
for i in range(array.size() - 1, -1, -1):
|
||||
print(array[i])
|
||||
[/codeblock]
|
||||
Output:
|
||||
[codeblock]
|
||||
|
Loading…
Reference in New Issue
Block a user