Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty good implementation:

    > [] == []
    false
    > [] + []

    > {} + []
    0
    > [] + {}
    [object Object]
    > {} + {}
    NaN
Although it fails in this part (should be [10, NaN, 2]):

    > [10, 10, 10].map(parseInt)
    10,0,2


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: