for (var i = 0; i < somearray.length; i++) { myclass.foo({\'arg1\':somearray[i][0]}, function() { console.log(somearray[i][0]); }); }
for (var i = 0; i < somearray.length; i++) { myclass.foo({'arg1':somearray[i][0]}, function(somearray) { console.log(somearray[i][0]); }); }
And then in method foo call anonymous function with param.