Quote:
Originally Posted by Zoab
Am I wrong or are you actually defining an array in memory?
|
You don't define arrays in JS. There are no arrays in JS. Search the documentation no single mention of array in their.
What you have is 8M memory slots per effect and a[b] accesses the memory slot with offset a+b. Simple as that.
So in case a=0; b=3; a[0]=1; b[0]=2; a[1]=3; b[3]; you'd get your effects memory slots like: {1, 3, 0, 2, 0, 0, 6, ...}
Then doing 0[0] == 1; 0[1] == 3; 0[3] == 2; or even 2[3] == 6; will all evaluate to true.
EDIT: Just to reiterate you don't define arrays in JS. The memory region you access is just there from the very beginning and you just use it.