How to avoid console errors in older browsers

2014, Apr 16    


if (!window.console)
window.console = {};
if (!window.console.log)
window.console.log = function() {
};
if (!window.console.debug)
window.console.debug = function() {
};