title: map.delete(key) during map.forEach
body: <p>Typically, you cannot safely delete items from an list while you're looping through that list. Does this concept remain true for ES6 Maps?</p>
  <p>I tried this simple test without exceptions:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var map = new Map([['a',1],['b',2],['c',3]]);
      map.forEach((value,key,map)=&gt;
      {
            map.delete(key);
            let str = `["${key}",${value}] was deleted. `;
            str += `map.size = ${map.size}`;
            console.log(str);
      });</code></pre>
  </div>
  </div>
  </p>
  <p>It seems ok.</p>
  <p><strong>Update:</strong> I just read this <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach#Description" rel="nofollow noreferrer">reference</a> from Mozilla. It is certainly doable. I'd be interested in any performance benchmarks comparing this method of deletion with other methods (on larger datasets).</p>