$(document).ready(function (){
var names = new Array();
names[0] = 'jimit';
names[1] = 'vinod';
names[2] = 'vineet';
for( var x in names){
console.log(names[x]);
}
window.reLoad();
});
In the above code I want to wait till my for execution completes and then call window.reLoad();
Thanks
EDIT:
The above code is in callback function of an ajax request will this make a difference??