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

Many people have rules preventing the use of bool operators as flow control. With good reason.

3

u/NeatBeluga Mar 19 '19

Like a ternary operator?

1

u/seiyria Mar 19 '19

I also agree with this, and I don't particularly like that syntax either. Usually it's something you can do for dev real quick and delete it before you commit, though.