node basics

  • There is no global scope in node, only module scope (ie file scope), for example, there is a variable name in a.js, the value is 'sjf', when require('./a.js') in b.js , the name variable in a.js cannot be accessed in the b file.

             

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325064575&siteId=291194637