Skip to content

Commit 36976bc

Browse files
committed
remove default thisArg
1 parent f3a722b commit 36976bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

implementations/filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
If no elements pass the predicate callback, an empty array will be returned
1919
*/
2020

21-
Array.prototype.myFilter = function myFilter(callback, thisArg = this) {
21+
Array.prototype.myFilter = function myFilter(callback, thisArg) {
2222
const newArray = [];
2323
for (let i = 0; i < this.length; i += 1) {
2424
if (callback.call(thisArg, this[i], i, this)) {

0 commit comments

Comments
 (0)