I'm new to JS, so please forgive me if I have any mistakes.
I have a "unknown" number of URLs in a array, and I have to get them using Ajax, but not asynchronously. I want them to be retrieved one after another, but my current code fires everything at the same time.
Any assistance is appreciated - my current code is something like below:
urls = ["http://www.google.com/", "http://www.yahoo.com", "http://www.bing.com"] // the number of urls in this array changes
var gets = []
$.each(urls, function(index, url) {
gets.push($.ajax({
url: url
}));
});