From 8d5356295433c6b9c0a4431eb92523b63b0087b7 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 27 Feb 2020 23:33:31 +0100 Subject: [PATCH] doc: Mention concatenation using the `+` operator in Array This closes https://github.com/godotengine/godot-docs/issues/2452. --- doc/classes/Array.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index a294967fc92..234949277ac 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.