News for hackers. Stuff that matters.
Re:Do you really know JavaScript? by lmkg on Friday January 31, 2014 @06:12PM (#7159817)
I disagree, several of these issues can come in up innocent programs written by less-seasoned practitioners. For example, [] not ==ing [] seems like it would be an incredibly common noob mistake. Some of the auto-conversion rules make certain classes of true bugs difficult to find. And I could see someone from a more 'traditional' OOP background getting bitten by "string" != new String("string") != String("string).

I will give you that many of these test cases are simply looking for trouble, especially the examples explicitly monkeying around with, especially anything involving direct manipulation of prototypes. I am also personally not bothered by most numeric wonkyness because that's floats in general, not JavaScript in particular (though I wish it had true Ints).

Re:Do you really know JavaScript? by leeoniya on Friday January 31, 2014 @06:41PM (#7159967)
when you realize that "[]" is the same as "new Array()", it's not at all confusing.

however, typeof NaN == "number" is a major wtf.