Open symisz opened 1 year ago
Thanks for filing this issue, and sorry you are running into this, plese can you share a sample code to replicate this issue.
Yea, definitely.
const animals = [
{ name: 'Fluffy', species: 'rabbit'},
{ name: 'Caro', species: 'dog'},
{ name: 'Ed', species: 'dog'},
{ name: 'Jim', species: 'fish'},
{ name: 'Coco', species: 'cat'},
{ name: 'Max', species: 'fish'}
]
const isDog = (animal) => {
return animal.species === 'dog'
}
Array.prototype.reject = function(callback) {
return this.filter(item => !callback(item));
};
var dogs = animals.filter(isDog)
var otherAnimals = animals.reject(isDog)
console.log(otherAnimals);
it throws an error when invoking a custom prototype method i'm using JavaScript
this is the error