You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/09-classes/06-extend-natives/article.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2
-
# Extending build-in classes
2
+
# Extending built-in classes
3
3
4
4
Built-in classes like Array, Map and others are extendable also.
5
5
@@ -29,7 +29,7 @@ arr.constructor === PowerArray
29
29
```
30
30
31
31
So when `arr.filter()` is called, it internally creates the new array of results exactly as `new PowerArray`.
32
-
That's actually very cool, because we can keep using `PowerArray` methods further o the result.
32
+
That's actually very cool, because we can keep using `PowerArray` methods further on the result.
33
33
34
34
Even more, we can customize that behavior.
35
35
@@ -73,7 +73,7 @@ And we've already been talking about native classes extending each other: `Array
73
73
74
74
But statics are an exception. Built-in classes don't inherit static properties from each other.
75
75
76
-
In other words, the prototype of build-in constructor `Array` does not point to `Object`. This way `Array` and `Date` do not have `Array.keys` or `Date.keys`. And that feels natural.
76
+
In other words, the prototype of built-in constructor `Array` does not point to `Object`. This way `Array` and `Date` do not have `Array.keys` or `Date.keys`. And that feels natural.
77
77
78
78
Here's the picture structure for `Date` and `Object`:
0 commit comments