We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3a722b commit 36976bcCopy full SHA for 36976bc
implementations/filter.js
@@ -18,7 +18,7 @@
18
If no elements pass the predicate callback, an empty array will be returned
19
*/
20
21
-Array.prototype.myFilter = function myFilter(callback, thisArg = this) {
+Array.prototype.myFilter = function myFilter(callback, thisArg) {
22
const newArray = [];
23
for (let i = 0; i < this.length; i += 1) {
24
if (callback.call(thisArg, this[i], i, this)) {
0 commit comments