8
you are viewing a single comment's thread
view the rest of the comments
[-] towerful@programming.dev 3 points 1 week ago

Use early returns for gates.
Use functions for complicated "getters" (this is actually a move beyond their "getTheme" or "getDashboard" kinda examples".

Dont use complex nested of ternary or null coalescence.

Ie. Write readable code, not code golf.

Has some good examples of what not to do.

[-] bitfucker@programming.dev 1 points 1 week ago

Yep. Syntax sugars exist for a reason. Abusing any feature in a language will make it hard to read. Just take a look at the other article posted about building pipeline. Or heck, any other design pattern that becomes dogma like OOP in Java.

this post was submitted on 18 Nov 2026
8 points (100.0% liked)

JavaScript

2876 readers
1 users here now

founded 3 years ago
MODERATORS