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
You can use this code to check if console object exists
if('console' in window && 'log' in window.console)
{
// code using console.log here
}
Or this code
if(typeof window.console != 'undefined'
&& typeof window.console.log != 'undefined')
{
// code using console.log here
}
Also you can read this post http://alexandershapovalov.com/firebug-console-is-not-defined-60/ Inside the post link how to create jQuery wrapper for console