javascript - Debugging code with vs code, 'window is not defined' appears
迷茫
迷茫 2017-06-12 09:29:15
0
2
1410

Is this due to a problem with node running locally or some other reason? I read some similar questions but couldn't find a solution

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all (2)
刘奇

Because node is not a browser and does not have a window.

    迷茫

    The global variable window does not exist in node.js.
    Window is a browser specification, not a js language specification, so of course it cannot be used in nodejs.
    However, nodejs has a similar global variable called golgal, but its internal content is very different from the window in the browser.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!