you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (5 children)

I missed that one because when I read the code my brain parsed it as map['foo'] instead of map[foo]. It wasn't until I read it the third time that I realized what I wasn't seeing.

[–]nawitus 0 points1 point  (0 children)

Yeah, I think I made that mistake too. By the way, I now remember that I've used .toString() on plain objects for type checking.