I know that ===
operator used to determine whether its both operands are equal and identical or not.(我知道===
运算符用于确定其两个操作数是否相等且相同。)
That is to say that if left side operand has 1 then the right side operand must be 1 for returning true
.(也就是说,如果左侧操作数为1,则右侧操作数必须为1才能返回true
。) but I don't get why javascript returns true for this calculation.(但我不明白为什么javascript对于此计算返回true。)
true || 1 === 1/3;
//true;
I don't get how this result can be true in javascript.(我不知道如何在javascript中实现此结果。)
ask by Ami Nirob translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…