Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
emef
on Dec 11, 2012
|
parent
|
context
|
favorite
| on:
Two Things About Conditionals in JavaScript
I'd argue that it's a bad practice to leave out the last else if condition even when it seems redundant. What happens if NaN is passed to your function? It will return 'big' when you probably want to throw an exception or something more meaningful.
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: