title: Issue assigning Ajax data to global variable
body: <p>I am getting data from an <code>AJAX</code> source and then assigning it to a global variable which doesn't seem to be working. Can someone please point me into the right direction?</p>
  
  <pre><code>var products = [];
      var count = 0;
      $.ajax(
      {
          url: 'url',
          success: function(response)
          {
              prCallback(response);
  
          },
          dataType: 'jsonp'
      });
      function prCallback(response)
      {
          window.products = response;            
      }
      console.log(products);
  </code></pre>
  
  <p><code>products</code> is still an empty <code>array</code>, despite assigning value. </p>