JS-Interpreter icon indicating copy to clipboard operation
JS-Interpreter copied to clipboard

arguments.toString() should return "[object Arguments]"

Open cpcallen opened this issue 7 years ago • 1 comments

If you want to be pedantically ES5.1 compatible, then the following code should alert "[object Arguments]" instead of "foo,bar":

(function(){
  alert(arguments.toString())
})("foo", "bar")

cpcallen avatar Apr 20 '17 11:04 cpcallen

Not too concerned about the above issue. But this one has more functional impact:

function foo(a) {
  arguments[0] = 42;
  alert(a);
}
foo(7);

NeilFraser avatar Apr 20 '17 17:04 NeilFraser