I have this in a function:
for (i=0; i < toTranslateArray.length; i++)
{
(function(i)
{
getTranslation(toTranslateArray[i],function(callback_result)
{
trans += callback_result;
});
})(i);
}
// code using last value of trans
I need to use last value of trans. I have seen a lot of examples but i just can`t make it work. Another answers same with my problem: link