HTML comments are valid in JavaScript!
<!-- This will not break your JS code (have not tested it in node) -->
[] == ![]; // -> true
This one has to do with how == (the abstract equality operator) works. It converts both sides to a common type and then compares. These are the rules from the spec:

In this case, == converts both sides to numbers. First it evaluates ![] which becomes false. That false is turned into a number, resulting in 0 on the right side. The left side [] is turned into a number, also becoming 0. Then we end up with 0 == 0 which is true.
See also:
!![] // -> true
[] == true // -> false
NaN === NaN //false
Though this behavior seems counterintuitive, it is specified in the spec:
If Type(x) is different from Type(y), return false. If Type(x) is Number, then If x is NaN, return false. If y is NaN, return false. If x is the same Number value as y, return true. If x is +0 and y is -0, return true. If x is -0 and y is +0, return true. Return false. Return SameValueNonNumber(x, y).
Here's a bit more background from the spec:
The Number type has exactly 18437736874454810627 (that is, 264 - 253 + 3) values, representing the double-precision 64-bit format IEEE 754-2008 values as specified in the IEEE Standard for Binary Floating-Point Arithmetic, except that the 9007199254740990 (that is, 253 - 2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special NaN value. In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behavior is implementation-dependent; to ECMAScript code, all NaN values are indistinguishable from each other.
How could there be 9007199254740990 distinct NaN values? It has to do with the way NaN values are represented. They follow this pattern: (all values are 0 or 1)
s111 1111 1xxx xxxx xxxx xxxx xxxx xxxx
s is the sign of the NaN value (most often ignored in applications)1's