Comment

Comment by jQueryIsAwesome

I found a way... well, sort of:

    var log = function(){
        args = [].slice.call(arguments);
        args.unshift(console);
        return console.log.bind.apply(console.log, args) 
    }
But you have to add extra parenthesis at the end, hopefully is not too much overhead for most devs.

    log("message")()

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton