Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const notMatch = array => value => !array.includes(value);
- //testing
- const newFilter = notMatch([3,5]);
- const array125 = [... Array(125).keys()];
- console.log ( array125.length);
- const filteredArray = array125.filter(newFilter);
- console.log ( filteredArray.length)
- //Lets try to get the [3,5] array back using two NOT filters
- console.log ( array125.filter ( notMatch(filteredArray)) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement