I know how to initialize them like
but that only allows me to add 1 element inside the array. When starting my script, I do not know if I will need to initialize it like this [, , ] to have three elements contained in the array, or if i will need 5 elements contained in the array until later on. How would I go about correctly initializing the 2d array? For example,
Code: Select all
if (numberOfArraysIWillNeed = 5)
array := [, , , , ]
except the number of arrays I would need could be anywhere from 1 to 500.