Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jpeterson
on Jan 14, 2012
|
parent
|
context
|
favorite
| on:
Search: .lenght - Github
The same pattern is widely used to test whether an array-like object is empty. Since a length of 0 is also "falsey", it evaluates as false when the array has no elements. A typo in this case would result in the tested array always being "empty".
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: