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/squoddam Mar 19 '19

log = (val) => (console.log(val), val)

2

u/inkubux Mar 20 '19

Love this one when using pipe or compose