Created
May 12, 2019 12:28
-
-
Save cptiwari20/667cdedebdf22fe6a3d19d44f45d4653 to your computer and use it in GitHub Desktop.
a JavaScript method receiving an array of objects containing name+age+gender, returning everyone between 30 and 40 years old grouped by gender.
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
| //people array will be needed | |
| function adultBw3040(peopleArray){ | |
| return peopleArray.filter(person => (person.age >= 30 ) && (person.age <= 40 )) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment