File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ Due to the first case `test` now acts like like a plain function call; therefore
9595` this ` inside it will no longer refer to ` someObject ` .
9696
9797While the late binding of ` this ` might seem like a bad idea at first, it is in
98- fact what makes [ prototypical inheritance] ( #object.prototype ) work.
98+ fact what makes [ prototypal inheritance] ( #object.prototype ) work.
9999
100100 function Foo() {}
101101 Foo.prototype.method = function() {};
Original file line number Diff line number Diff line change 11## The Prototype
22
33JavaScript does not feature a classical inheritance model, instead it uses a
4- * prototypical * one.
4+ * prototypal * one.
55
66While this is often considered to be one of JavaScript's weaknesses, the
7- prototypical inheritance model is in fact more powerful than the classic model.
7+ prototypal inheritance model is in fact more powerful than the classic model.
88It is for example fairly trivial to build a classic model on top of it, while the
99other way around is a far more difficult task.
1010
1111Due to the fact that JavaScript is basically the only widely used language that
12- features prototypical inheritance, it takes some time to adjust to the
12+ features prototypal inheritance, it takes some time to adjust to the
1313differences between the two models.
1414
1515The first major difference is that inheritance in JavaScript is done by using so
@@ -104,7 +104,7 @@ the features of newer JavaScript engines; for example,
104104
105105### In conclusion
106106
107- It is a ** must** to understand the prototypical inheritance model completely
107+ It is a ** must** to understand the prototypal inheritance model completely
108108before writing complex code which makes use of it. Also, watch the length of
109109the prototype chains and break them up if necessary to avoid possible
110110performance issues. Further, the native prototypes should ** never** be extended
You can’t perform that action at this time.
0 commit comments