Skip to content

Instantly share code, notes, and snippets.

@jx13xx
Created January 18, 2022 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jx13xx/266bca2e226020cd7b67c4395f28dde5 to your computer and use it in GitHub Desktop.
Save jx13xx/266bca2e226020cd7b67c4395f28dde5 to your computer and use it in GitHub Desktop.
Filtering search in array using arrow method
const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
const result = words.filter(word => word.length > 6);
const containsE = words.filter(word => word.match(/[e]/g) );
console.log(containsE);
console.log(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment