Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
and -> or, methods -> methods
I also have a question on the subject of this sentence (should this be a separate discussion entry?):
In the "Extending built-in classes" article, in the "No static inheritance in built-ins" subsection, one finds:
"But built-in classes are an exception. They don’t inherit statics from each other.
For example, both Array and Date inherit from Object, so their instances have methods from Object.prototype. But Array.[[Prototype]] does not reference Object, so there’s no Array.keys() and Date.keys() static methods."
In the "Extending built-in classes" article, in the "No static inheritance in built-ins" subsection, one finds:
"But built-in classes are an exception. They don’t inherit statics from each other.
For example, both Array and Date inherit from
Object
, so their instances have methods fromObject.prototype
. ButArray.[[Prototype]]
does not referenceObject
, so there’s noArray.keys()
andDate.keys()
static methods."This is a subject of some curiosity for me. Through a little testing, I believe I have found that, in fact
Array.[[Prototype]]
DOES, however, referenceFunction.prototype
, i.e.Array.__proto__ === Function.prototype
(true
). (As doesDate.[[Prototype]]
). Is there someplace where this is explained? (Preferably in a way an intelligent 11-year-old could understand?).