title: Convert to for of loop for standard for loop?
body: <p>I am trying to convert this standard for loop to es6 for of loop.  I tried to convert it from the original :</p>
  <pre><code>   let formdata = document.forms[0].elements;  //let in place of var
     let numelems = formdata.length;
   for (let i = 0; i &lt; numelems; i++){   // for of replaces for (let i = 0;i&lt;numelems;i++){
                  if (formdata[i].type == 'text' &amp;&amp; formdata[i].value === ''){
                      msg += &quot;&lt;br&gt;please enter your &quot; + formdata[i].name;
                      checker = false;
                  }
  </code></pre>
  <p>But it broke the page validation.
  Here is the code I tried:</p>
  <pre><code>for (let i of numelems){   // for of replaces for (let i = 0;i&lt;numelems;i++){
                  if (formdata[i].type == 'text' &amp;&amp; formdata[i].value === ''){
                      msg += &quot;&lt;br&gt;please enter your &quot; + formdata[i].name;
                      checker = false;
                  }
  </code></pre>
  <p>Where did my code go wrong?</p>