Skip to content

Instantly share code, notes, and snippets.

@mr-pascal
Created February 12, 2021 17:08
Show Gist options
  • Save mr-pascal/3f42c132dca2c4de9e0286a3829effbe to your computer and use it in GitHub Desktop.
Save mr-pascal/3f42c132dca2c4de9e0286a3829effbe to your computer and use it in GitHub Desktop.
// Methods
(() => {
let a = 5;
let b = { a: 4 };
((c, d) => {
c = 4;
d.a = 5;
})(a, b);
console.log(`-- Method --`)
console.log(`a: ${a}`); // a: 5
console.log(`b: ${JSON.stringify(b)}`); // b: {"a":5}
console.log(`\n`)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment