I appreciate that you took the time to write a comment.
You remind me of a friend that has been waiting for 2 years to get some experience in order to give advice to beginners.
He just keeps giving strange advice and the junior devs simply ignore him.
The MDN webdocs just provide the following note:
If you're writing ES6 compatible code, then rest parameters should be preferred.
I never said that you should write all of your code with the tricks that I used, they're just presented as an interesting read.
It seems you just missed the point completely.
Nice tips for any of those contests to do things in the few number of lines, but I'm with David Hunt, this is almost a must set of error lint rules. In enterprise apps, never sacrifice readability for fewer lines of code without a very, very good reason.
"You remind me of a friend that has been waiting for 2 years to get some experience in order to give advice to beginners."
Your friend is right. When I see advice like the ones in the article, I usually say "I hope your doctor and your lawyer are better at their job than this."
I've handled over a 100 front-end interviews for my employers and code like that would seriously hurt candidates chances.
I'm sure you're an expert in the bleeding edge technology that your employer is using and you're really good at those interviews, but it seems you just missed the point of this article.
Look, I would not be commenting here, if I haven't seen over and over again junior devs reading such articles and rushing to use tricks from them everywhere. The best course of action for you would be to remove half of the tricks you've written, since only harm can come out of them. The question is - are you willing to admit you were wrong or is your ego more important to you than your readers?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.