Last active
August 13, 2017 06:29
-
-
Save pycraft114/0ba5f287d0edb7bd871978ffe29b02d8 to your computer and use it in GitHub Desktop.
Call by sharing example 1
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
function test(a, b){ | |
a = { something : "this is something" }; | |
b.hello = "no greetings for you"; | |
} | |
var firstArg = { hello : "hello world" }; | |
var secondArg = { hello : "hello world" }; | |
test(firstArg, secondArg); | |
console.log(firstArg, secondArg); | |
/*out put | |
{ hello: 'hello world' } | |
{ hello: 'no greetings for you' } | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment