Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pka
on Jan 2, 2012
|
parent
|
context
|
favorite
| on:
Reducing Code Nesting
Well:
val = condition() ? 20 : 10; return val;
jonathanwallace
on Jan 2, 2012
|
next
[–]
Did you invert the logic of the parent post on purpose?
marshray
on Jan 2, 2012
|
prev
[–]
Or even:
return condition() ? 10 : 20;
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: