summaryrefslogtreecommitdiff
path: root/doc/classes/Array.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-28 07:04:28 +0100
committerGitHub <noreply@github.com>2020-02-28 07:04:28 +0100
commite0cc5209ffff90ed7d24ac5d5d4580797d7d6158 (patch)
treede4ec6e7f01eba5a878a57c4298c34b9f06eef60 /doc/classes/Array.xml
parent807b511125006817373f975e0b833881c966f8cc (diff)
parent8d5356295433c6b9c0a4431eb92523b63b0087b7 (diff)
Merge pull request #36624 from Calinou/doc-improve-array
doc: Mention concatenation using the `+` operator in Array
Diffstat (limited to 'doc/classes/Array.xml')
-rw-r--r--doc/classes/Array.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index a294967fc9..234949277a 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -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>