Good time of day! I recently started learning JavaScript and I'm having some difficulty with asynchronous requests. I have to do a lot of requests to the server in as a short time as possible.
for (i=0;i<10;i++;) {
method.call(get, data: "id", function(result) {
id = id.concat(data.id);
})
}
I think my way is incorrect since the request can not be processed in time and has the risk of not getting part of the information.
If you understand what I mean, is there a universal method that is used in such cases and are there any links to articles where all details of working with asynchrony and emerging issues are explained? Sorry for the long question.
method.call(get, data: "id", function(result) { id = id.concat(data.id); })this is not valid js syntax