/ Published in: JavaScript
Basically creates a log function on the window object and uses console.log or alert depending on which is supported. Very basic and simple but definitely useful.
Expand |
Embed | Plain Text
window.log = function(){ var output = Array.prototype.slice.call(arguments); window.console ? console.log(output) : alert(output); }
You need to login to post a comment.
