Skip to content

Instantly share code, notes, and snippets.

@mplungjan
Created January 5, 2013 10:25
Show Gist options
  • Save mplungjan/4460894 to your computer and use it in GitHub Desktop.
Save mplungjan/4460894 to your computer and use it in GitHub Desktop.
Cross browser rudimentary console
//if (!window.console) window.console={ log:function(str) { alert(str) } }
if (!window.console)
window.console={ log:function() {
var text = [];
for (var a,i=0;i<arguments.length;i++) {
a=arguments[i];
text.push(typeof a+": "+(typeof a == "object" ? a.toString():a));
}
alert(text.join('\n'))
}
}
console.log("test",new Date())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment