Open likui628 opened 2 years ago
Is it ever possible that (a== 1 && a ==2 && a==3) could evaluate to true in JavaScript?
(a== 1 && a ==2 && a==3)
const a = { val: 1 }; a[Symbol.toPrimitive] = () => a.val++; console.log(a == 1 && a == 2 && a == 3);
Is it ever possible that
(a== 1 && a ==2 && a==3)
could evaluate to true in JavaScript?