Update article.md
I think this work better
This commit is contained in:
parent
94c83e9e50
commit
e6ad338a76
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ Even more, we can customize that behavior.
|
|||
|
||||
We can add a special static getter `Symbol.species` to the class. If exists, it should return the constructor that JavaScript will use internally to create new entities in `map`, `filter` and so on.
|
||||
|
||||
If we'd like built-in methods like `map`, `filter` will return regular arrays, we can return `Array` in `Symbol.species`, like here:
|
||||
If we'd like built-in methods like `map` or `filter` to return regular arrays, we can return `Array` in `Symbol.species`, like here:
|
||||
|
||||
```js run
|
||||
class PowerArray extends Array {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue