Created
August 13, 2017 06:30
-
-
Save pycraft114/7cbd652789d9be1effac807ffad8815f to your computer and use it in GitHub Desktop.
Call by sharing example 2
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
function test(a, b){ | |
a.value = 70; | |
b = b * 20; | |
} | |
var firstArg = { age: 10 }; | |
var secondArg = 30; | |
test(firstArg, secondArg); | |
console.log(firstArg); | |
console.log(secondArg); | |
/* | |
out put | |
firstArg = { age: 70 }; | |
secondArg = 30; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment