Why it says that it's [[Prototype]]
is Object
? Object
is a Function
object and the real prototype of obj
is Object.prototype
.
Asked
Active
Viewed 33 times
0

LearningMath
- 851
- 4
- 15
- 38
-
"Object is a Function object " How do you figure? – jmargolisvt Nov 08 '17 at 20:04
-
Because `Object` is a constructor function. It's a function, and all function are `Function` objects. – LearningMath Nov 08 '17 at 20:07
1 Answers
1
It says that its [[prototype]] (which you know is Object.prototye
) "is an Object
". No more no less. It does not imply that the value is the same as the global Object
variable.

Bergi
- 630,263
- 148
- 957
- 1,375
-
So you are implying that it only says that it's prototype is a regular object? Why is this relevant then, when every object's `[[Prototype]]` is an object? It can't be anything else. – LearningMath Nov 08 '17 at 20:10
-
1It's not relevant, it's just how all objects are shown - there is no exception for `Object.prototype`. And actually, it does show the class name for custom instances (see [here](https://stackoverflow.com/q/25141170/1048572) for eample). – Bergi Nov 08 '17 at 20:14