How do I go about using variable from multiple files in node js?

后端 未结 0 927
北海茫月
北海茫月 2020-11-29 07:41

I want to get a variable from one .js file to another .js file. Right now I have main.js

const balances = require(\'./balance\');
console.log(balances.balance         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题