Try using a condition like this instead, as if console is not supported it will throw undefined not false;
if(typeof console !== "undefined") {
console.log('removing child');
}
However to prevent having to wrap all your console log statemnts I would just put this snippet in your code. This will stop IE throwing any error
if(typeof console === "undefined") {
console = {
log: function() { },
debug: function() { },
...
};
}