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
A nice simple and short way of outputting to the console safely is as follows:
window.console && console.log('Debug message');