title: Jquery Ajax responseText returns undefined but when i log it as an object it returns the ajax text
body: <p>responseText returns undefined but when i log it as an object it returns the ajax text. I think it might have something to do with the readystate not being ready before it assigns the text to the variable</p>
  
  <p>When I do this:</p>
  
  <pre><code>function loadTrack(){
      var min = -10;
      var max = 10;
      var randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
      var track = $.get("generate_song.php?track_number="+randomNumber);
          if(randomNumber &gt; 0 &amp;&amp; randomNumber !== previousNumber){
              previousNumber = randomNumber;
          }else{
              randomNumber = 1;
          }
  
         console.log(track);
  }
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>Object {readyState: 1, getResponseHeader: function, getAllResponseHeaders: function, setRequestHeader: function, overrideMimeType: function…}
  abort: function (e){var t=e||w;return u&amp;&amp;u.abort(t),k(0,t),this}
  always: function (){return i.done(arguments).fail(arguments),this}
  complete: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  done: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  error: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  fail: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  getAllResponseHeaders: function (){return 2===b?a:null}
  getResponseHeader: function (e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t}
  overrideMimeType: function (e){return b||(p.mimeType=e),this}
  pipe: function (){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&amp;&amp;e[t];i[o[1]](function(){var e=s&amp;&amp;s.apply(this,arguments);e&amp;&amp;x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()}
  progress: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  promise: function (e){return null!=e?x.extend(e,r):r}
  readyState: 4
  responseText: "Audio_Files/09%20Dream%20of%20Witches%20Dinner%2C%20V%20mov.%20f.m4a.mp3&lt;br/&gt;"
  setRequestHeader: function (e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this}
  arguments: null
  caller: null
  length: 2
  name: ""
  prototype: Object
  __proto__: function Empty() {}
  &lt;function scope&gt;
  state: function (){return n}
  status: 200
  statusCode: function (e){var t;if(e)if(2&gt;b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this}
  statusText: "OK"
  success: function (){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&amp;&amp;p.has(n)||l.push(n):n&amp;&amp;n.length&amp;&amp;"string"!==r&amp;&amp;i(n)})})(arguments),n?o=l.length:r&amp;&amp;(s=t,c(r))}return this}
  then: function (){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&amp;&amp;e[t];i[o[1]](function(){var e=s&amp;&amp;s.apply(this,arguments);e&amp;&amp;x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()}
  __proto__: Object
  </code></pre>
  
  <p>But when I do This:</p>
  
  <pre><code>function loadTrack(){
      var min = -10;
      var max = 10;
      var randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
      var track = $.get("generate_song.php?track_number="+randomNumber);
          if(randomNumber &gt; 0 &amp;&amp; randomNumber !== previousNumber){
              previousNumber = randomNumber;
          }else{
              randomNumber = 1;
          }
  
         console.log(track.responseText);
  //or if i just do it when assigning track
  }
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>undefined script.js:41
  XHR finished loading: "http://localhost/generate_song.php?track_number=10". jquery.js:6
  </code></pre>