Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lma21
on Aug 12, 2016
|
parent
|
context
|
favorite
| on:
Return True to Win
How did you solve the reflexive? I'm not getting at anything :(
kqr
on Aug 12, 2016
|
next
[–]
NaN != NaN. It's how you're supposed to test for NaN, apparently.
madawan
on Aug 12, 2016
|
parent
|
next
[–]
Or use isNaN
kqr
on Aug 13, 2016
|
root
|
parent
|
next
[–]
I'll give you one chance to guess how isNaN is implemented.
https://github.com/v8/v8/blob/e6d1a80e790117dc27b20e9b14de4b...
TobbenTM
on Aug 12, 2016
|
prev
|
next
[–]
Yeah, tricky one. NaN works though. Because NaN == NaN = false
weisk
on Aug 12, 2016
|
prev
|
next
[–]
Another version, also 3 characters: 0/0
razorsese
on Aug 12, 2016
|
prev
|
next
[–]
Infinity - Infinity
kitfung
on Aug 12, 2016
|
prev
|
next
[–]
reflexive( function() {return ++window.x;}() )
posterboy
on Aug 12, 2016
|
parent
|
next
[–]
I don't think so
Zekio
on Aug 12, 2016
|
prev
|
next
[–]
I broke things to do it
[] - {}
Burgos
on Aug 12, 2016
|
prev
[–]
`NaN`
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: