What's the difference between [removed] and [removed] in JavaScript?

后端 未结 16 2124
故里飘歌
故里飘歌 2020-11-22 12:37

Should both of them reference the same object?

16条回答
  •  情深已故
    2020-11-22 13:21

    document.location.constructor === window.location.constructor is true.

    It's because it's exactly the same object as you can see from document.location===window.location.

    So there's no need to compare the constructor or any other property.

提交回复
热议问题