Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
botker
on Dec 29, 2011
|
parent
|
context
|
favorite
| on:
Why ++[[]][+[]]+[+[]] = 10 in JavaScript
One of the core principles of JavaScript is to avoid errors whenever possible. Using + on arrays bothers me less than the fact that there is no error for division by zero.
pietro
on Dec 29, 2011
[–]
It's not an error to divide by zero per the IEEE floating point specification, and you'll find the same behavior in most modern languages:
http://en.wikipedia.org/wiki/Division_by_zero#In_computer_ar...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: