1You can not access 'window' in node.js!
2'window' is only available in web browsers.
1'window' is only defined in the context of web browsers.
2You must run your code by linking it in an HTML document that is running
3in your browser to have access to 'window' and other DOM features.