title: Javascript error on expanding table row in Microsoft Edge
body: <p>I have this js code that expands and collapses html table rows. It works in <strong>Firefox</strong> and <strong>Chrome</strong>:</p>
  <pre><code>const id = &quot;item-&quot; + item.split(&quot; &quot;).join(&quot;&quot;);
  const itemRow = document.getElementById(id);
  itemRow.classList.toggle(&quot;open&quot;);
  
  const elems = document.getElementsByClassName(item);
  
  if (itemRow.className.split(&quot; &quot;).indexOf(&quot;open&quot;) &gt; -1) {
    itemRow.classList.remove(&quot;closed&quot;);
    [...elems].forEach(e =&gt; {
      e.classList.remove(&quot;hidden-item&quot;);
    });
  } else {
    itemRow.classList.add(&quot;closed&quot;);
    [...elems].forEach(e =&gt; {
      e.classList.add(&quot;hidden-item&quot;)
    });
  }
  </code></pre>
  <p>But in <strong>Edge</strong> I get a &quot;function expected&quot; error in the browser console on line 9 (the <code>forEach</code>).</p>
  <p>Any idea what this means and how to fix it for Edge?</p>