Subj : Re: Is "arguments" an array or not in Rhino? To : Larry Blair From : Igor Bukanov Date : Tue Apr 15 2003 11:39 pm Larry Blair wrote: > The following function works in spidermonkey, but not in Rhino: > > function f(){ > var c = [].concat(arguments); > return c;} > var x = f("A", "B"); > die (x.length+"|"+x[0]+"|"+x[1]); > > Spidermonkey results = 2|A|B In the current SM the result would be the same as in Rhino: 1|[object Arguments]|undefined For details, see http://bugzilla.mozilla.org/show_bug.cgi?id=169795 but the bottom line is that EcmaScript standard states 2 things: 1. Array.prototype.concat should flatten only instances of Array. 2. arguments object is not Array instance Thus the reason for the change in SM and Rhino. Regards, Igor .