![]() 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 <code>Object</code>, so their instances have methods from <code>Object.prototype</code>. But <code>Array.[[Prototype]]</code> does not reference <code>Object</code>, so there’s no <code>Array.keys()</code> and <code>Date.keys()</code> static methods." This is a subject of some curiosity for me. Through a little testing, I believe I have found that, in fact <code>Array.[[Prototype]]</code> DOES, however, reference <code>Function.prototype</code>, i.e. <code>Array.__proto__ === Function.prototype</code> (<code>true</code>). (As does <code>Date.[[Prototype]]</code>). Is there someplace where this is explained? (Preferably in a way an intelligent 11-year-old could understand?). |
||
---|---|---|
1-js | ||
2-ui | ||
3-frames-and-windows | ||
4-binary | ||
5-network | ||
6-data-storage | ||
7-animation | ||
8-web-components | ||
9-regular-expressions | ||
script | ||
.gitattributes | ||
.gitignore | ||
AUTHORING.md | ||
changes.sketch | ||
css.md | ||
figures.sketch | ||
LICENSE.md | ||
README.md | ||
todo.md |
The Modern JavaScript Tutorial
This repository hosts the English content of the Modern JavaScript Tutorial, published at https://javascript.info.
Translations
We'd like to make the tutorial available in many languages. Please help us to translate.
See https://javascript.info/translate for the details.
Contributions
We'd also like to collaborate on the tutorial with other people.
Something's wrong? A topic is missing? Explain it to people, add as PR 👏
You can edit the text in any editor. The tutorial uses enhanced "markdown" format, easy to grasp. And if you want to see how it looks on-site, there's a server to run the tutorial locally at https://github.com/javascript-tutorial/server.
The list of contributors is available at https://javascript.info/about#contributors.
Structure
Every chapter, article or a task has its folder.
The folder is named like N-url
, where N
is a number for the sorting purposes and url
is the URL part with title of the material.
The type of the material is defined by the file inside the folder:
index.md
stands for a chapterarticle.md
stands for an articletask.md
stands for a task (solution must be provided insolution.md
file aswell)
Each of these files starts from the # Main header
.
It's very easy to add something new.
♥
Ilya Kantor @iliakan