Subj : "named" vs. anonymous function To : netscape.public.mozilla.jseng From : Jens Thiele Date : Fri Dec 10 2004 06:36 pm Hi, just out of curiousity: why do named functions have an additional prototype (in spidermonkey)? example: spidermonkey shell: js> x=function foo(){} function foo() { } js> y=function (){} function () { } js> x.__proto__===Function.prototype false js> x.__proto__.__proto__===Function.prototype true js> y.__proto__===Function.prototype true a graph perhaps better visualizing it: (13k) rhino does not do this: js> x=function foo(){} function foo() { } js> y=function (){} function () { } js> x.__proto__===Function.prototype true js> y.__proto__===Function.prototype true Jens .