Godot - Initialize array
GDScript code example to initialize array.
Can initialize array using clear()
in GDScript.\r
This returns an empty array.
var array = ["apple", "lemon"]
array.clear()
print(array)
# []
Result of clear()
and following process is equivalent.
var array = ["apple", "lemon"]
array = []
print(array)
# []