Hacker News new | ask | show | jobs
by Timwi 7 days ago
There are a few mistakes in this talk; I'll list just two that I noticed.

1. He calls Array(16) and then talks about there being 16 separators. Of course, there are only 15. This kinda breaks the Batman joke.

2. He writes {}+[] and claims that he's adding a list to an object, then mocks the fact that it gives a different result than []+{} which gives [object Object]. In reality, if you write ({}+[]), you also get [object Object]. I'll leave it as a puzzle for you to figure out why {}+[] is different. (Hint: Gurer vf ab bowrpg gurer.)

2 comments

Good catch. I'm sure there could be more technical inaccuracies in the talk, but again, this is for entertainment purposes I assume, not education.
Yet in node REPL:

    > {}+[]
    '[object Object]'
    > []+{}
    '[object Object]'
... because Node's REPL and some consoles pre-wrap input that looks object-ish :)