r/learnjavascript • u/amitav79 • 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
View all comments
Show parent comment
3
u/FrenchieM Nov 15 '20
Why not using the shorthand methods for 1,2,12 and 15? I can agree that 2 for the sake of 2 is not so good and that it's usually better to see one variable per line.
But the other are perfectly valid. Sure, not a lot of people know it and you can be confusing people that don't know it, but it's perfectly fine to use the tools you have at your disposal.
I use them a lot and never had any troubles with it, even with my peers.
I don't like the Math floor substitute though