Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. const notMatch = array => value => !array.includes(value);
  2. //testing
  3. const newFilter = notMatch([3,5]);
  4. const array125 = [... Array(125).keys()];
  5. console.log ( array125.length);
  6. const filteredArray = array125.filter(newFilter);
  7. console.log ( filteredArray.length)
  8.  
  9. //Lets try to get the [3,5] array back using two NOT filters
  10. console.log ( array125.filter ( notMatch(filteredArray)) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement