Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zanderwohl
on April 10, 2020
|
parent
|
context
|
favorite
| on:
How to Avoid the Assignment Statement (2010)
You could switch the order they're compared and due to short-circuiting the second eval would only ever take place once. Or initialize min to the zeroth item in the array.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: