I have two arrays in javascript, here's a small example:
arr1 = [0, 0, 0, 0];
arr2 = [3,6,3,5];
I want to tween all the numbers from arr1 to arr2. So,
from 0 to 3
from 0 to 6
from 0 to 3
from 0 to 5
I tried doing something like:
TweenLite.to(this, duration, {arr1:arr2});
but it didn't work, so I tried again:
for (var i = 0; i < arr1.length; i++) {
TweenLite.to(this, duration, {arr1[i]:arr2[i]});
}
But that threw up an error.
What's the best way to do this? In my real code, I a