im using for each loop to get all the elements in the array, but I don’t want all of the elements to be used, how do I remove 2 random elements before it gets looped?
thanks. but how do i specify how many elements to remove in this example? is it last index input?
Yup. If you set First to 1 and Last to 5, you’ll remove up to 5 elements.
The stuff in the pic would attempt to remove up to 56 elements since it’s starting at 0.
It’s up to because we’re terminating early (Break) in case the array gets emptied. Last index returns -1 when the array is empty.