> var obj = Object.create(null);
undefined
> obj.toString();
TypeError: undefined is not a function
> Object.toString();
"function Object() { [native code] }"
See, obj
is created with null
as the prototype, so when you call .toString()
on it, error will happen.
But Object
self is a function, and whose prototype is a Function object, which has the .toString()
method.