Wow, Javascript, so powerfull..
Following this Stackoverflow question:
Can (a ==1 && a== 2 && a==3) ever evaluate to true?
And the answer is .. yes..
const a = {
i: 1,
toString: function () {
return a.i++;
}
}
if(a == 1 && a == 2 && a == 3) {
console.log('Hello World!');
}
Thank you , loose equality operators.
Not sure, if it is used as intended;)
This post has been upvoted by @microbot with 9.0%!
Vote for my creator @isnochys as witness!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit