I am writing a module for node.js and one file is not enough. I want to connect the submodule to the current module's namespace. Something of type include in c ++. How do I change the code to make it work?
variables.js:
var a = 3; index.js:
console.log(a);
requireis the only way, because each file in node.js creates a separate, isolated scope for it - Dmitriy Simushevthis- Darth