Merge pull request #36624 from Calinou/doc-improve-array

doc: Mention concatenation using the `+` operator in Array
This commit is contained in:
Rémi Verschelde 2020-02-28 07:04:28 +01:00 committed by GitHub
commit e0cc5209ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,12 @@
array[2] = "Three"
print(array[-2]) # Three.
[/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.
</description>
<tutorials>