Occasionally, I saw this problem in a blog. At that time, the author cited a lot of ecmascript specifications, which are still in English, and I was dizzy. Now I will put the conclusions of others here. If you have time, write this blog according to your own understanding.
----------- Conclusion -------------
- Relational operators and equal operators are not in the same category.
- Relational operators, in design, always need to convert the element to a number. While equality operators are not considered in design.
- The most important thing is not to take the result of A> B, A = B for granted to establish a contact with a> = B. the correct relationship with the original design idea is that A> B and A> = B are a group. A = B and other equal operators are a group. for example, a = B,! = B,! = B.
Therefore, we look at this problem in turn:
Null> 0//If null attempts to convert to number, it is 0. Therefore, the result is false,Null> = 0//If you try to convert null to number, the value is 0 and the result is true.Null= 0//Null is designed, and transformation is not attempted here. Therefore, the result is false.
Not complete...