Last active
August 22, 2019 18:20
-
-
Save udittyagi/9f9fce4e1d15af3367bd031c4b1eadf9 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
const exportObj = {}; | |
(function () { | |
const sum = (a, b) => { | |
return a + b; | |
}; | |
const result1 = sum(2, 3) | |
console.log(result1) //5 | |
exportObj.sum = sum; | |
})() | |
const result2 = exportObj.sum(5, 8) | |
console.log(result2) // 13 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment