-
-
Save dexteryy/d70007a9910fa7e482d04d9ebd5c9cc3 to your computer and use it in GitHub Desktop.
node.js question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a.js | |
var b = require('./b'); | |
b.a.b = 4; | |
module.exports = b.a; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// b.js | |
exports.a = { a: 1, b: 2 }; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c.js | |
var b = require('./b'); | |
b.a = 3; | |
exports.a = b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
var a = require('./a'); | |
var b = require('./b'); | |
var c = require('./c'); | |
console.log(a, b, c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment