I have a two functions from this answer to another question:
1.
const destroy = container => {
document.getElementById(container).innerHTML = '';
};
const destroyFast = container => {
const el = document.getElementById(container);
while (el.firstChild) el.removeChild(el.firstChild);
};
Why second func is faster than first func?