My title may be undescriptive but this is my problem. I have a for loop thats doing a get requests in jquery but I can't read any defined local variables thats in the for loop as it gets rewritten as the loop continutes
for(i=0;i<10;i++){
var Something = i
$.get("http://example.com",function(){
console.log(Something)
})
}
the output would be 10 10 10 10 10 10 10 10 10 10
How would I go about passing the Something variable into the function?