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:
|
To iterate over an [Array] backwards, use:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
var array = [3, 6, 9]
|
var array = [3, 6, 9]
|
||||||
for i in range(array.size(), 0, -1):
|
for i in range(array.size() - 1, -1, -1):
|
||||||
print(array[i - 1])
|
print(array[i])
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
Output:
|
Output:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
|
|
Loading…
Reference in New Issue