Re: "with" statement, extending prototype
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: "with" statement, extending prototype

From: Thomas 'PointedEars' Lahn <PointedEars@web.de>
Date: Wed Apr 05 2006 - 21:59:32 CEST

RobG wrote:

> eman1000@gmail.com said on 05/04/2006 1:23 PM AEST:
>> [...]
>> It is my understanding that
>>
>> function myfunc() {
>> }
>>
>> is the exact same as
>>
>> var myfunc = function(){}
>
> Not *exactly* the same, the first is a function declaration, the second
> is a function expression. With an expression, the name (identifier) is
> optional, so a closer match is:
>
> var myfunc = function myfunc(){};
>
> One difference is that Gecko's JS engine assigns a name attribute to the
> function's arguments object. If the function is anonymous, the name
> attribute is empty. Not so for a function declaration, which must have
> an identifier (IE doesn't provide an arguments.name property).

`name' attribute of the arguments object? What the heck are you talking
about?

PointedEars
Received on Mon May 1 04:43:31 2006