To delete a node in BST having two children we need code example
Example: delete all childs in node
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}
while (myNode.firstChild) {
myNode.removeChild(myNode.lastChild);
}