JavaScript убейте всех детей

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