Skip to content
Create a gist now

Instantly share code, notes, and snippets.

// Latest Firefox (including nightly):
(function () {
// a function declaration
// does not replace arguments object
function arguments() {}
alert(arguments); // "[object Object]", should be function
// nor even if to assign a new value then
arguments = 10;
alert(arguments); // "[object Object]", should be 10
// CORRECT with vars
// However, if we have a variable declaration
// with later assignment, it's OK
(function () {
// a variable declaration
// correctly does not disturb
// arguments object
var arguments;
alert(arguments); // OK, "[object Object]"
// and its assignment again correctly does
arguments = 10;
alert(arguments); // 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.