r/learnjavascript • u/ms-maria-ma • May 15 '19
7 Useful JavaScript Tricks
https://davidwalsh.name/javascript-tricks
70
Upvotes
1
u/karatetoes May 15 '19
Really useful site! Bookmarked!
1
u/ikeif May 15 '19
I matured as a developer when David was starting out writing - I’m really glad he is cranking more stuff out again.
1
u/Obann May 15 '19
Brilliant stuff, keeping these in mind for the next time before diving into some overly complex solution is the tricky part.
1
3
u/delventhalz May 15 '19
I dig most of these, but boolean conversion for filter is entirely redundant. Just use identity:
.filter(x => x). And the empty object thing seems both pointless and potentially confusing. What is the use case for that?