Could you please kindly correct what I've done wrong?
var ipLocations = []; // variable in question
for (i = 0; i < ips.length; i++) {
    (function(i) {
        setTimeout(function() {
            $.getJSON(....
};
alert(ipLocations); // becoming '' here:(
Why ipLocations is '' here?
 
    