JavaScript Bunuh Semua Anak

function removeAllChildNodes(parent) {
    while (parent.firstChild) {
        parent.removeChild(parent.firstChild);
    }
}
Code language: PHP (php)
Joao Guilherme