Duplicate array
Hello,
Please can anyone tell me the best way to duplicate an array and then push it into itself ??
Do I need to use concat or is there a way I can keep the original array ?
Thanks in advance
Hello,
Please can anyone tell me the best way to duplicate an array and then push it into itself ??
Do I need to use concat or is there a way I can keep the original array ?
Thanks in advance
my code is just fine, but I would like to create 96 tiles instead of 48..
Two of each instance.
if you want 96 tiles, increase one (or both) of your for-loops so you create 96 tiles. that has nothing to do with array duplication.
arrays are variables. their elements point to objects but are not the actual objects. if you want more objects, create them. if you want more object references, duplicating array elements or an array might make sense.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.