r/javascript • • Mar 18 '19

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

385 Upvotes

422 comments sorted by

View all comments

Show parent comments

5

u/catwhatcat Mar 19 '19

This post was about one liners and it's a nice one liner, but I would never commit that either for the sake of posterity + readability.

1

u/ChronSyn Mar 19 '19

I agree it's not really readable and why splitting it out over a few lines is better. Just for the sake that the thread was about one-liners is the reason it was all on one line.