Created
November 5, 2012 22:27
-
-
Save timrwood/4020818 to your computer and use it in GitHub Desktop.
Changing args
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 changeArgs (args) { | |
args[0] = 'hello'; | |
args[1] = "is it me you're looking"; | |
args[2] = 4; | |
} | |
function lionel(a, b, c) { | |
console.log(a, b, c); | |
changeArgs(arguments); | |
console.log(a, b, c); | |
} | |
lionel("sing", "me", "a song"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment