-
I asked: "Is…
js const emptyElement = el => { while (el.hasChildNodes()) { el.removeChild(el.lastChild); } }
…faster than setting the
innerHTML
to an empty string?" Turns out browsers have optimized the sh1t out of DOM operations it seems! ⤵️ x.com/1Marc/status/1568206606013276160