DEV Community

Discussion on: Four tricky JavaScript concepts in one line of code

Collapse
 
terstuyahmaksim profile image
Max

This is all very funny and cool, but it's bad code because it's hard to read. Good code - no need to document. One glance at the names of the variables makes it clear what should be there and what to do with it. Immediately you need to read it, and more than once. But overall, yes. Very brief and succinct.

Collapse
 
perenstrom profile image
Per Enström

Absolutely. I think that these kinds of functions can be okay in a contained context so that anything using it will call a method with a well understood name, the implementation details are not important for the calling context.