Why isn't my future value available now? : <p>My ajax call is not returning anything! Here is my code:</p>

<pre><code>var answer;
$.getJSON('/foo.json') . done(function(response) { answer = response.data; });
console.log(answer);
</code></pre>

<p>Even though the network call is succeeding, and I can see that the response contains data, the console logs "undefined"! What is happening?</p>
