It is said every javascipt object have internal prototype property,then predefined Function object also have the internal prototype property.So which object prototype does its internal prototype called proto points to?
function Object(){}
alert(Object.constructor)//function Function(){[native code]}
so i m referring to the internal prototype of the function Function(){} object not its prototype property . like Function object instance have their internal prototype pointing to Function object.prototype likewise Function object internal prototype point to what?not taking about the prototype property that gets added to it.I know what will the internal prototype of the prototype object points to.
-
Can you show a code example of what object you're referring to?zzzzBov– zzzzBov2013年01月28日 19:32:52 +00:00Commented Jan 28, 2013 at 19:32
-
@rekire why dont it have the sence??Function object also have the internal prototype propertyMaizere Pathak– Maizere Pathak2013年01月28日 19:34:09 +00:00Commented Jan 28, 2013 at 19:34
-
Why do you keep asking this question?David G– David G2013年01月28日 19:35:11 +00:00Commented Jan 28, 2013 at 19:35
-
@MaizerePathak, please have someone assist you with your English, it is difficult to understand you. Rephrasing your question would be helpful.zzzzBov– zzzzBov2013年01月28日 19:35:33 +00:00Commented Jan 28, 2013 at 19:35
-
All your questions seem to be about prototypes and functions... if you don't understand the answers to your previous questions, please comment on them and ask for clarification instead of asking a slightly modified version of the same question.Felix Kling– Felix Kling2013年01月28日 19:37:48 +00:00Commented Jan 28, 2013 at 19:37
2 Answers 2
All objects inherit from Object.prototype, but they may inherit from other prototypes as well depending on the type of object. Functions inherit from Function.prototype (which inherits from Object.prototype).
1 Comment
Function is a function, so it inherits from Function.prototype.In Javascript, functions are just a specific type of object. Thus a function's prototype is the same thing as an object's prototype. For more reading on functions as objects, check out this link.