title: Not able to extract data inside for loop in Javascript fetch
body: <p>Below is the code , I was able to console returned data using a testvalue variable but not able to get the data if i use for loop? What could be the reason for this?</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  value =  document.getElementById('tweets')
  function fetchUserData(){
      fetch('/list/')
        .then(response =&gt; response.json())
        .then((data)=&gt; {
            testvalue = data['response'][1]
             console.log(testvalue)
             for(var i =0; i&lt;data.length; i++)
             {
                 console.log(i)
             }
          })
          }
          fetchUserData()
      &lt;/script&gt;
  </code></pre>