r/javascript • • Mar 02 '19

Useful javascript one-liners.

https://medium.com/@smellycode/js-one-liners-8bc0a6af2345?source=friends_link&sk=a9295a05aef9e514e137fca7eeb89cd1
344 Upvotes

96 comments sorted by

View all comments

7

u/frankandsteinatlaw Mar 02 '19

I’m not sure if the “one-liner” lens is all that useful. I think you’ve presented some useful bits of code here but having the code be one line or two lines or three shouldn’t really matter. I’d personally rather see lists like these themed by functionality vs arbitrary line count, especially when some of the examples become harder to read due to this restriction.

4

u/smellycode Mar 02 '19

Agree. I have tried to shed some on this in the conclusion section.

2

u/frankandsteinatlaw Mar 02 '19

Ah, admittedly I skimmed the examples. Glad to hear you speak on this.