'Global' object in node.js

前端 未结 4 2138
难免孤独
难免孤独 2020-12-06 03:05

I am using 0.3.1-pre Node.js

Doing this:

typeof global.parseInt

results in

\'undefined\'

Howeve

4条回答
  •  鱼传尺愫
    2020-12-06 03:41

    Defining variable in app.js without var, just like myvar='someval' makes it visible inside every .js in your project

提交回复
热议问题