소스 검색

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

doc: Mention concatenation using the `+` operator in Array
Rémi Verschelde 5 년 전
부모
커밋
e0cc5209ff
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      doc/classes/Array.xml

+ 6 - 0
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>