T
T
timur1022018-11-29 17:49:47
API
timur102, 2018-11-29 17:49:47

How to generate an array of numbers from N to M?

I am using execute method in vk api and i need to generate an array from n to m.
execute:
Next, I will use the users.get method,
increase n and m by 25, generate an array.
And so 25 times.
You can prepare an array in advance. I only see this solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2018-11-29
@timur102

var n = 0; 
var m = 25; 
var result = [];
while(n < m) {
  result.push(API.users.get({user_ids: n})); 
  n = n + 1;
}
return result;

like this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question