title: Passing variables through javascript jquery
body: <p>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</p>
  
  <pre><code>for(i=0;i&lt;10;i++){
      var Something = i 
      $.get("http://example.com",function(){
          console.log(Something)
      })
  }
  </code></pre>
  
  <p>the output would be 
  10
  10
  10
  10
  10
  10
  10
  10
  10
  10</p>
  
  <p>How would I go about passing the Something variable into the function?</p>