I understand that IE only treats console as an object if the debug window is open. If the debug window is not open, it treats console as undefined.
Which is why I decided to add an if check like this :
if(console)
console.log('removing child');
My understanding is that if console is undefined it will skip the console.log. However in IE8 the if(console) line passes and I get an undefined exception like before at console.log. This is weird.
Is there a way around this? and how do you code console in your code so that it runs on all three browsers?