Created
January 18, 2022 08:44
-
-
Save jx13xx/266bca2e226020cd7b67c4395f28dde5 to your computer and use it in GitHub Desktop.
Filtering search in array using arrow method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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