1. Data type: string,number,boolean,object,null,undefined
2, abstract equality: x==y
A, both data types are the same: typeof x = = typeof y
A, string:x is exactly the same as the character of the Y position, returns True, otherwise false.
b, the value of number:x and y is equal, returns True, otherwise false is returned. Exception:Nan==nan, returns false.
C, boolean:x and Y values are equal, returns True, otherwise false.
D, Object:x is the same as the Y reference, returns True, otherwise false.
E, null:x and y are Null, that is, Null==null returns True. Note: typeof null = = Object
F, undefined:x and Y are the same as Undefined, that is, undefined==undefined, returns True.
B, the two data types are different, convert to the same type and then compare:
A,undefined = = NULL, returns True
B,True==1, return true;false==0, return True
C, 1==new String ("1"), returns True, "2" ==new number (2), returns True.
3, Strictly equal: x===y
A, the type is not equal, the return is False
B, note:
NULL = = = NULL, returns TRUE.
undefined = = = Undefined, returns TRUE.
Null = = = Undefined, return false.
Nan = = = Nan, returns false.
Conclusion: The difference between strict and abstract, such as strict first requirement type, in the comparison process does not perform type conversion, abstract and so on the type of the comparison object will perform the conversion, and then converted to the same type before it is worth comparing.
Abstract equality = = in JavaScript and strict equality = = =