extends Node2D
func _ready():
# Ways to create an array instance
var a = Array()
var b = []
var c = ["a","b","c"]
# Add some items to array 'a'
a.append("Item 1")
a.append("Item 2")
# Pass array by reference to a function
change(a)
# Confirm that changes were made
print(a[0])
# Print the size of array 'b'
print(b.size())
# Shuffle the values of array 'c'
c.shuffle() # This function doesn't return a value
# Check that the element order was changed
print_elements_of(c)
func change(a):
a[0] = 1
func print_elements_of(array):
# Here we are using one of the Pool array types
print(PoolStringArray(array).join(""))