r/javascript • • Mar 18 '19

What's your favorite, most useful javascript one-liner?

385 Upvotes

422 comments sorted by

View all comments

1

u/bminixhofer Mar 19 '19
console.log=(()=>{var a=console.log;return(...b)=>{a(...(!(b.length>>1)&&b[0].charAt?['%c'+b[0],'font:1em Comic Sans MS']:b))}})();

This will change the font of your log to Comic Sans. I don't know what I would do without it.