Created
August 23, 2019 07:52
-
-
Save udittyagi/4724a801325ba3c5d5ea98424cc22a51 to your computer and use it in GitHub Desktop.
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
exports = {} // don't do this | |
const obj = { | |
firstName: 'Udit', | |
lastName: 'Tyagi' | |
} | |
// don't export items like this, as assigning will change the reference | |
exports = obj | |
//To correctly export, here we are not changing reference of exports | |
exports.name = obj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment