Javascript multiple assignment statement

前端 未结 6 1965
小鲜肉
小鲜肉 2021-01-03 10:28

I saw that line in some code

window.a = window.b = a;

How does it work?

Does the following always return true?

win

6条回答
  •  孤独总比滥情好
    2021-01-03 11:11

    Actually, window.a==a can be false if a has the value Number.NaN. That's because Number.NaN is not equal to any value, including itself.

提交回复
热议问题