Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
stefek99
on Dec 26, 2014
|
parent
|
context
|
favorite
| on:
JavaScript Equality Table
Object plus object is not a number :)
https://www.destroyallsoftware.com/talks/wat
hajile
on Dec 27, 2014
|
next
[–]
That's because the first 'object' is a block instead of an object literal.
jwmerrill
on Dec 27, 2014
|
prev
[–]
For another surprise, try assigning those empty objects to variables before adding. By itself,
{}+{}
doesn't mean what you might think it means.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://www.destroyallsoftware.com/talks/wat