Re: How are arguments a legit argument to Array.slice?
- From: lorlarz <lorlarz@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 13:47:29 -0700 (PDT)
On Aug 29, 2:40 pm, Lasse Reichstein Nielsen <lrn.unr...@xxxxxxxxx>
wrote:
I'm jumping into the middle here, but was the problem the[snip]
interpretation of
Array.prototype.slice.call(arguments)
This calls the "call" method on the function "Array.prototype.slice"
with the argument "arguments".
This gives approximatly the same effect as placing the function
as a method of the arguments object and calling it.
arguments.somename = Array.prototype.slice;
... arguments.somename();
just without actualy creating a property on the arguments object.
--
Lasse Reichstein Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Believe it or not, I think I understand. The function is
being called with only one argument (the arguments object)
and thus that is the context of the function call on
the slice method. Did I say that correctly?
.
- References:
- How are arguments a legit argument to Array.slice?
- From: lorlarz
- Re: How are arguments a legit argument to Array.slice?
- From: lorlarz
- Re: How are arguments a legit argument to Array.slice?
- From: lorlarz
- Re: How are arguments a legit argument to Array.slice?
- From: Lasse Reichstein Nielsen
- How are arguments a legit argument to Array.slice?
- Prev by Date: Re: Javascript Name action problem
- Next by Date: Re: How are arguments a legit argument to Array.slice?
- Previous by thread: Re: How are arguments a legit argument to Array.slice?
- Next by thread: Re: How are arguments a legit argument to Array.slice?
- Index(es):
Relevant Pages
|
Loading