I have little problem. I am working with one companys API\'s. I request for activities and they return me array of activities. Here is part of code.
client.r
If you don't care about IE8- then ES5 already solves this issue with forEach:
forEach
activities.forEach(function(v, i){ // now 'i' will work anywhere within this scope });