📌  相关文章
📜  javascript window 和 Window 的区别 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:03.839000             🧑  作者: Mango

代码示例1
Window is a function, as you can see. It's the constructor for the windows (but you can't build new windows directly with the constructor, you usually use the Window.open function). Window.prototype thus holds the methods you can call on the window).

window is the global variable holding an instance of Window, it represents the browser window containing your document (not really a "window" usually, rather a tab in modern browsers).

You can check that
window instanceof Window
is true