-
-
Save swashata/75e7e0a7e8398c66623b96084709bf51 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const scoo = 'doo'; | |
console.log(module.exports === exports); | |
// Assign variable scoo to exports | |
exports.scoo = scoo; | |
// Assign variable scoo to module.exports | |
module.exports = scoo; | |
console.log(module.exports === exports ); |
This file contains hidden or 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
const a = require('a'); | |
console.log(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The question is what would the output of all the
console.log
from both the files, if we run this command