So I was bored and I decided to play around with some things.
I ran these codes:
print(#{1, nil, nil, nil, nil, nil, nil, nil, nil, 10})
From what I know the length operator stops at nil. The first nil value. Since [2] is nil the length of my array is 1. But it returns 10. Why is this?
Thank you in advance to anyone who answers.
Edit
When I said "the length operator stops at nil" this caused the length operator to return three;
print(#{1, 2, 3, nil})
Edit2
This would print 1:
local arr = {"no"}
arr[3] = "yes"
print(#arr)

1 comment
thats because you're using the discord bot...