Skip to content

Instantly share code, notes, and snippets.

@brianyang
Forked from nuxodin/easy-console.js
Created December 15, 2016 01:43
Show Gist options
  • Save brianyang/fd0c6863186ca84e2e93058859fd830f to your computer and use it in GitHub Desktop.
Save brianyang/fd0c6863186ca84e2e93058859fd830f to your computer and use it in GitHub Desktop.
Like to write to the console like this "console = xyz" instead of "console.log(xyz)" ?
!(function(){
var original = console;
Object.defineProperty(window, 'console', {
get:function(){
return original;
},
set:function(value){
original.log(value)
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment