I use Firebug\'s console.log() for debugging my website. If I try viewing my website in browsers without Firebug then I get a console is not defined er
My final solution:
if(!("console" in window)) window.console = {log: function() {}};