Created
February 13, 2020 10:10
-
-
Save DmitryMasley/4efbdffe182c0431cd003d69c44e5ebf 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 index = 1; | |
((arg) => { arg++ })(index); | |
console.log(`Index: ${index}`); | |
const str = "a"; | |
((arg) => { arg.toUpperCase() })(str) | |
console.log(`String: ${str}`); | |
const obj = { index: 1, str: "a" }; | |
((arg) => { arg.index++; arg.str.toUpperCase(); })(obj); | |
console.log(`Object ${JSON.stringify(obj)}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment