DEV Community

Discussion on: 8 Best JavaScript One-Liners

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

While I'm not saying that all of these suffer from it, this is the kind of programming that leads to performance hell. People get so used to shorthand versions of things (mostly loop-based), that end up enumerating collections an enormously unnecessary amount of times.

This is also found in .Net and the LINQ advocates.

Bottom line: Shorter is more commonly worse than you think. Analyze your algorithms thoroughly.

Collapse
 
shivams1007 profile image
Shivam Singh • Edited

It's not totally correct. It depends