I was wondering, how can i find out with javascript if the console object is available?
i have the problem that if i forget to remove a debug output
Simplest way would be:
if (window.console){ console.log('do something'); }
instead of just writing:
console.log('do something');