javascript jquery.getJSON weird behaviour
<p>I've been starting to experiment with javascript and jQuery. I was trying to create a class that would load a json file into a specified div, but I run into a behaviour I don't understand:</p>

<p><em>NOTE: I know this code won't load anything into a div, it's just the shortest example I could find to show the behaviour I don't understand.</em></p>

<pre><code>function test(div) {
    this.div = div;
    _this = this;
    jQuery.getJSON('/example.json', null, function(data) {
        console.log(_this.div);
    });
}
</code></pre>

<p>when I run</p>

<pre><code>a = new test("a"); 
b = new test("b");
</code></pre>

<p>I expected to see "ab" as the output, but the actual output is "bb".
However, if I allow for the first line to finish before calling the second one, then the expected output is shown. I'm confused!</p>
