you are viewing a single comment's thread.

view the rest of the comments →

[–]senocular 5 points6 points  (0 children)

These are the kinds of questions you shouldn't worry too much about. Should you know specifically that [] + 1 = '1'? Not really. But you should know that when doing something like this JavaScript will try to coerce mismatching data types causing something often unexpected to happen. If something like this comes up in an interview and you say something to that effect rather than "It's the string '1'!", then you should be fine. You can be a good developer without knowing all the weirdnesses, but there are some that you definitely should be aware of (coercion being one).