Skip to content

Instantly share code, notes, and snippets.

@cfj
Last active August 21, 2017 10:00
Show Gist options
  • Save cfj/9857886 to your computer and use it in GitHub Desktop.
Save cfj/9857886 to your computer and use it in GitHub Desktop.
More console.log sillyness
var _log = console.log;
window.console.log = function(log){
_log.call(console, log.reverse ? log.reverse() : typeof log === 'string' ? log.split('').reverse().join('') : typeof log === 'number' ? log.toString().split('').reverse().join('') : typeof log === 'boolean' ? !log : log);
};
@dillonforrest
Copy link

@mathiasbynens I somehow feel that bulletproof string reversal is not really the main objective here. LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment