Translator Reviews ( English → Japanese )

Rating: 60 / 0 Reviews / 28 Sep 2013 at 12:00

o63odt
o63odt 60 Extensive experience in providing hig...
English

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.

Japanese

注※これは2つのアンダースコア、そのあとに5つの英字「proto」、それに続きまた2つのアンダースコアである。
オブジェクトが作られると、__proto__ のプロパティぃは と同じオブジェクトを内部の[[Prototype]](コンストラクターのプロトタイプオブジェクト)。__proto__に新しいバリューをアサインすることで、拡張不可能でない限り、オブジェクトが内部の[[Prototype]]プロパティも変更される。

プロトタイプが継承にどう使用されるか理解するにはMDN article Inheritance and the prototype chain をみること。
以下には、Employeeという新しいインスタンスが作成され、__proto__がコンストラクターのプロトタイプと同じオブジェクトであることを検証する。 

Reviews ( 0 )

There are no translator reviews yet.