Comparison operators: ">" "<" ">=" "<=" "= =" "! =" "= = =" "!=="
1. The operator is normally compared on both sides of the number;
2. All strings are converted to ASCII comparison (the first letter, the same as the next comparison, until the size);
3. In the case of numeric and string comparisons, try to convert the string (here is an implicit call to the number conversion string instead of converting the string to an ASCII value) and false if the result is not converted;
4.undefined comparison with any type of data the return result is false
Undefined with any numeric calculation returns the result is Nan
5. Determine whether two objects are equal compared to the memory address pointed to by the pointer.
For example:
var obj1={name: ' Zhangsan ', Age:18};var obj2={name: ' Zhangsan ', Age;18};console.log (OBJ1==OBJ2);
The output is false because Obj1 and OBJ2 have different addresses in memory.
I know about JS is still shallow, if there are errors, please correct me, thank you!
JavaScript comparison operators