Create shortcut to console.log() in Chrome

When I reported it, it was refused but the answer was simple – create the shortcut like this:

var log = console.log.bind(console);

This doesn’t leave out the line number, whilst you can call it like log(...).

Leave a Comment