title: Getting undefined in XMLHttpRequest
body: <p>I'm currently learning APIs and calling them using XMLHttpRequest. I am also trying to use JSON.parse...hopefully correctly. However when used in my program it's returning undefined, so my displayQuote is working, it's just not able to return my data.</p>
  
  <p>I've been having some difficulties with logic structure, so I can't figure it out! Any help or hints as to why I'm not receiving the data parsed into author and text would be very helpful.</p>
  
  <pre><code>var getQuote = new XMLHttpRequest();
  getQuote.onreadystatechange = function () {
    if (getQuote.readyState == 4 &amp;&amp; getQuote.status == 200) {
  
    var arrObj = JSON.parse(getQuote.responseText);
    author = arrObj.title;
    text = arrObj.content; 
    displayQuote();
  </code></pre>