JS: Double Equal Operator
- The double equal operator
==
can be used to test equality of Primitive Value of the same type. - 🛑 WARNING: If left-hand-side and right-hand-side are of different type, it does a type conversion first, often resulting unexpected result.
💡 TIP: never use double equal. Use Triple Equal Operator instead.
// all true [] == "" "0" == 0 "" == 0 1 == true