JavaScript: Double Equal Operator

By Xah Lee. Date: . Last updated: .

πŸ’‘ TIP: never use double equal. Use Triple Equal Operator instead.

console.log([] == "");
console.log("0" == 0);
console.log("" == 0);
console.log(1 == true);

JavaScript Boolean

JavaScript Operators

BUY Ξ£JS JavaScript in Depth