Creating multidimensional arrays

Be very careful when using repeat, it only creates one array and copies the same one to multiple locations. Editing one of the values will affect them all.

Go far back enough in my activity and you’ll find that this caused a huge bug in my code.

Edit: It’s a nuanced case, I think it’s fine here because the elements of the array are bitstypes, but arrays of arrays will cause issues when used with repeat:

3 Likes