Remove all the children DOM elements in div December 10, 2022 by Tarik while (node.hasChildNodes()) { node.removeChild(node.lastChild); }