Do all browsers support this? I would like to output an error using console.log() but was wondering if this supported by all browsers?
console.log()
console.
Here is a workaround for when console.log() is not available. You have to retrieve the console.logs yourself.
console.logs
if (!window.console) window.console = {}; if (!window.console.log) { window.console.logs = []; window.console.log = function (string) { window.console.logs.push(string); }; }