Symbol.iterator is not a function
<pre><code>&lt;div id="par"&gt;
    &lt;span id="a1"&gt;&lt;/span&gt;
    &lt;span id="a2"&gt;&lt;/span&gt;    
&lt;div id="par2"&gt;     
    &lt;span id="a3"&gt;&lt;/span&gt;
    &lt;span id="a4"&gt;&lt;/span&gt;
&lt;/div&gt;    
&lt;/div&gt;

&lt;script&gt;


var ele = document.querySelectorAll('#par span');    

for( var p of ele ){
    console.log(p);
}


&lt;/script&gt;
</code></pre>

<p>When i run this code I see error </p>

<blockquote>
  <p>Uncaught TypeError: ele[Symbol.iterator] is not a function</p>
</blockquote>

<p>How to fix this problem ?</p>