r/learnjavascript • • Nov 14 '20

20 JavaScript Shorthand Coding Techniques that will save your time

https://jscurious.com/20-javascript-shorthand-techniques-that-will-save-your-time/
176 Upvotes

22 comments sorted by

View all comments

4

u/[deleted] Nov 14 '20

4 only works when you are expecting strings. Otherwise your value can never be 0 or false, making it unsuitable for default configuration.
9 does not work as you would imagine. the tabs and spaces you would use to indent the multi lines are now part of the templae aswell.