考考你们的JS 我只作对了一半 你们试试Numeric comparison can be forced by: a - 0 b - 0.Boolean com
考考你们的JS 我只作对了一半 你们试试
Boolean comparison can be forced by: !a == !b.
The equality operators maintain the following invariants:
A != B is equivalent to !(A == B).
A == B is equivalent to B == A, except in the order of evaluation of A and B.
The equality operator is not always transitive. For example, there might be two distinct String objects,
each representing the same string value; each String object would be considered equal to the string
value by the == operator, but the two String objects would not be equal to each other.
Comparison of strings uses a simple equality test on sequences of code point value values. There is no
attempt to use the more complex, semantically oriented definitions of character or string equality and
collating order defined in the Unicode 2.0 specification. Therefore strings that are canonically equal
according to the Unicode standard could test as unequal. In effect this algorithm assumes that both
strings are already in normalised form.
看完规范就比较好理解啦 42 楼 EePoo 2011-06-02 这么全啊,以后肯定用得上
