doc: Mention concatenation using the `+` operator in Array
This closes https://github.com/godotengine/godot-docs/issues/2452.
This commit is contained in:
parent
e66d519286
commit
8d53562954
|
@ -14,6 +14,12 @@
|
||||||
array[2] = "Three"
|
array[2] = "Three"
|
||||||
print(array[-2]) # Three.
|
print(array[-2]) # Three.
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
Arrays can be concatenated using the [code]+[/code] operator:
|
||||||
|
[codeblock]
|
||||||
|
var array1 = ["One", 2]
|
||||||
|
var array2 = [3, "Four"]
|
||||||
|
print(array1 + array2) # ["One", 2, 3, "Four"]
|
||||||
|
[/codeblock]
|
||||||
Arrays are always passed by reference.
|
Arrays are always passed by reference.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
|
|
Loading…
Reference in New Issue