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

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

Should both of them reference the same object?

16条回答
  •  梦谈多话
    2020-11-22 13:24

    Yes, they are the same. It's one of the many historical quirks in the browser JS API. Try doing:

    window.location === document.location
    

提交回复
热议问题