Y
Hacker News
new
|
ask
|
show
|
jobs
by
some1else
2339 days ago
I usually try to flatten the branches, using `else if` when a `switch` statement isn't viable.
if (A && B) { return 1 else if (A && !B) { fix(B) return 1 else { return 0 }