title: Asynchronous jQuery variable
body: <p>So i spend whole two days on trying to understand this, and maybe im still missing something. I declare global variable in callback, which is executed after recieving json, so why still my var is undefined?</p>
  
  <pre><code>$.getJSON("http://ipinfo.io", callbackFuncWithData);
  
  function callbackFuncWithData(data)
  {
   response = data;
  }
   console.log(response);
  </code></pre>