oldChild = element.removeChild(child)

* child is the child node to be removed from the DOM.
* element is the parent node of child.
* oldChild holds a reference to the removed child node. oldChild == child.

The removed child node still exists in memory, but is no longer part of the DOM. You may reuse the removed node later in your code, via the oldChild object reference.
Let's say I want to swap out child nodes. (I know I could use replaceChild for this in non-IE browsers, but that's DOM level 2 spec, and IE6/7 doesn't play nice with level 2)

If I "document.getElementById('child')" where both the removed child and the newly inserted child have id="child", will the code hiccup because the old node is still in memory, or will document.getElementById ignore the old node because the old child is no longer part of the DOM?

The goal is a javascript-based application, and I'm trying to conserve screen space by swapping out pieces of the puzzle, depending on what the user wants to do.