Created
October 7, 2011 13:50
-
-
Save lennym/1270328 to your computer and use it in GitHub Desktop.
Odd arguments behaviour in Google Chrome
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 foo (val) { | |
console.log(arguments, arguments[0]); | |
val = 2; | |
} | |
foo(1); | |
// logs "[2], 1" in Google Chrome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment