Created
October 25, 2012 13:25
-
-
Save trodrigues/3952530 to your computer and use it in GitHub Desktop.
crazy var reference behavior on Android 2.3.6
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 func(firstarg){ | |
console.log(firstarg); // on Chrome it's defined, on Android 2.3.6 browser it's defined | |
var args = Array.prototype.splice.call(arguments, 0, arguments.length); | |
console.log(arguments[0]); // on Chrome it's undefined, on Android 2.3.6 browser it's undefined | |
console.log(firstarg); // on Chrome it's defined, on Android 2.3.6 browser it's *undefined* | |
} | |
func("hello"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment