[Translation from English to Japanese ] An Object's __proto__ property references the same object as its internal [[P...

This requests contains 1336 characters . It has been translated 4 times by the following translators : ( blackdiamond , linne0213 , o63odt ) and was completed in 5 hours 23 minutes .

Requested by xargs at 28 Sep 2013 at 06:28 1801 views
Time left: Finished

An Object's __proto__ property references the same object as its internal [[Prototype]] (often referred to as "the prototype"), which may be an object or, as in the default case of Object.prototype.__proto__, null . This property is an abstraction error, because a property with the same name, but some other value, could be defined on the object too. If there is a need to reference an object's prototype, the preferred method is to use Object.getPrototypeOf.
A __proto__ pseudo property has been included in §B.3.1 of the draft ECMAScript ed. 6 specification (note that the specification codifies what is already in implementations and what websites may currently rely on).

オブジェクトの__proto__ プロパティは、 そのオブジェクトを内部[[Prototype]](しばしば"the prototype"と呼ばれる)として参照する。この参照の対象は、オブジェクトもしくはObject.prototype.__proto__のデフォルトであるNullとなる。このプロパティは抽出エラーである。これは、同名のプロパティで別の値を持つ場合、そのオブジェクト上で定義することもできるからである。オブジェクトのプロトタイプを参照する必要があれば、Object.getPrototypeOfを使用することが好ましい。
__proto__ 疑似プロパティは、ECMAScript エディション6仕様書草案の§B.3.1に記載されている(この仕様は、既に実装されているものおよびウェブサイトが現在使用している可能性があるものを編纂したものであることに注意)。

Note: that is two underscores, followed by the five characters "proto", followed by two more underscores.
When an object is created, its __proto__ property is set to reference the same object as its internal [[Prototype]] (i.e. its constructor's prototype object). Assigning a new value to __proto__ also changes the value of the internal [[Prototype]] property, except where the object is non–extensible.

To understand how prototypes are used for inheritance, see the MDN article Inheritance and the prototype chain.

In the following, a new instance of Employee is created, then tested to show that its __proto__ is the same object as its constructor's prototype.

注意:2つのアンダースコア(_)、続けて"proto"の5文字、その後さらに2つのアンダースコアである。
オブジェクトが作成されると、その __proto__プロパティは、そのオブジェクトの内部の[[Prototype]](つまり、コンストラクタのプロトタイプ オブジェクト)として参照に設定される。オブジェクトが拡張不能である場合を除き、__proto__に新しい値を割り当てることによっても、内部[[Prototype]]プロパティの値が変化する。

プロトタイプが継承においてどのように使用されるかを理解するには、MDNの「Inheritance and the prototype chain(継承とプロトタイプ チェーン)」という記事を参照。

以下のコードでは、Employeeの新しいインスタンスが作成され、その後__proto__はそのコンストラクタのプロトタイプと同じオブジェクトであることを示すためのテストが行われている。

Try “Standard Translation” for specialized translation such as business purpose.

  • We can receive files such as Word, Excel, and PowerPoint.
  • There is no maximum word limit, and we deliver translations fast.
  • Higher-skilled translators will work on your request.

Feel free to contact
anytime