It's my first steps in learning javascript, and I have simple code:
$(function(){
for(var i = 0; i < 5; i++) {
$.get('/', function(data) {
console.log('Request ' + i + ' succeeded');
}); }
});
but for me it shows only last string: "Request 5 succeeded", why does it show only last one? How can I fix it?