i was following a tutorial and i accidentally indented
extends Node
func _ready():
var zeroToNine = Array()
for i in range(10):
zeroToNine.append(i)
print(zeroToNine) <---Here
and it appeared in the Output as:
[0]
[0, 1]
[0, 1 ,2]
[0, 1, 2, 3]
[0, 1 ,2, 3, 4]
[0, 1, 2, 3, 4, 5]
[0, 1, 2, 3, 4, 5, 6]
[0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 2, 3, 4, 5, 6, 7, 8]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
instead of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
i realize what i did wrong but not why it adds a digit both 10 down and across thanks in advance.