Avoid confusing prototype methods for static methods
Correct: `Array.from()` (it’s a static method) Incorrect: `Array.join()` (doesn’t exist; it’s a prototype method) This patch uses the common `#` syntax to denote `.prototype.`.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Splits values into two groups. If an element in `filter` is truthy, the corresponding element in the collection belongs to the first group; otherwise, it belongs to the second group.
|
||||
|
||||
Use `Array.reduce()` and `Array.push()` to add elements to groups, based on `filter`.
|
||||
Use `Array.prototype.reduce()` and `Array.prototype.push()` to add elements to groups, based on `filter`.
|
||||
|
||||
```js
|
||||
const bifurcate = (arr, filter) =>
|
||||
|
||||
Reference in New Issue
Block a user