I've never written on VKScript (and on Javascript). I need high performance code to get more friend lists faster.var targets = Args.t; // get params (ids)// prepare all variables before loopvar all_friends = {};var req;var parametr = ;var start = 0;var q = {};var user_friends = {};// get each target from all targetswhile(start <= targets.length){    if (targets.substr(start, 1) != , && start != targets.length)    {        parametr = parametr + targets.substr(start, 1);    }    else    {        // make request for each id        q = {user_id:parametr};        req = API.friends.get(q);        if (req) // if user is alive        {            user_friends = {u:q[user_id], f:req[items]};        }        else // if user is deleted, there is no friends        {            user_friends = {u:q[user_id], f:[0]};        }        all_friends = all_friends + [user_friends];        parametr = ;    }    start = start + 1;}return all_friends;All suggestions and recommendations are welcome!
Get friend lists
performance;ecmascript 6;vkscript
I see only a minor improvement opportunity here.In the following snippet, much of the code in the if and else branches is duplicated:if (req) // if user is alive{    user_friends = {u:q[user_id], f:req[items]};}else // if user is deleted, there is no friends{    user_friends = {u:q[user_id], f:[0]};}It would be better to refactor in a way that avoids duplication:var friends = req ? req[items] : [0];user_friends = {u:q[user_id], f: friends};(For what it's worth, I had more suggestions while I believed vkscript has charAt method like JavaScript, apparently it doesn't. See the edit history if ever interested.)