re: Human Readable JavaScript VIEW POST

re: I think it's important not to simplify the code at a point where you avoid using functionalities which are useful but less readable for a newbie. ...

Interesting. I tend to think of one liners as less readable in most cases. But it’s an interesting perspective!


Developers in general agree with you. Most one liners beyond a standard if/else ternary are caught by default linting configs. If someone has to translate the code you write, it's meant for a machine. Given that this already happens once it hits an engine, it is generally not wise to write code in this manner.

“Code is for humans to read and machines to interpret”! Still don’t know who said it first, but it’s a great quote.

code of conduct - report abuse