Coding Meetup #7 - Higher-Order Functions Series - Find the most senior developer
Description:
You will be given a sequence of objects representing data about developers who have signed up to attend the next coding meetup that you are organising.
Your task is to return a sequence which includes the developer who is the oldest. In case of a tie, include all same-age senior developers listed in the same order as they appeared in the original input array.
For example, given the following input array:
var list1 = [
{ firstName: 'Gabriel', lastName: 'X.', country: 'Monaco', continent: 'Europe', age: 49, language: 'PHP' },
{ firstName: 'Odval', lastName: 'F.', country: 'Mongolia', continent: 'Asia', age: 38, language: 'Python' },
{ firstName: 'Emilija', lastName: 'S.', country: 'Lithuania', continent: 'Europe', age: 19, language: 'Python' },
{ firstName: 'Sou', lastName: 'B.', country: 'Japan', continent: 'Asia', age: 49, language: 'PHP' },
];
your function should return the following array:
[
{ firstName: 'Gabriel', lastName: 'X.', country: 'Monaco', continent: 'Europe', age: 49, language: 'PHP' },
{ firstName: 'Sou', lastName: 'B.', country: 'Japan', continent: 'Asia', age: 49, language: 'PHP' },
]
Notes:
- The input array will always be valid and formatted as in the example above and will never be empty.
This kata is part of the Coding Meetup series which includes a number of short and easy to follow katas which have been designed to allow mastering the use of higher-order functions. In JavaScript this includes methods like: forEach, filter, map, reduce, some, every, find, findIndex
. Other approaches to solving the katas are of course possible.
Here is the full list of the katas in the Coding Meetup series:
Coding Meetup #2 - Higher-Order Functions Series - Greet developers
Coding Meetup #3 - Higher-Order Functions Series - Is Ruby coming?
Coding Meetup #4 - Higher-Order Functions Series - Find the first Python developer
Coding Meetup #5 - Higher-Order Functions Series - Prepare the count of languages
Coding Meetup #6 - Higher-Order Functions Series - Can they code in the same language?
Coding Meetup #7 - Higher-Order Functions Series - Find the most senior developer
Coding Meetup #8 - Higher-Order Functions Series - Will all continents be represented?
Coding Meetup #9 - Higher-Order Functions Series - Is the meetup age-diverse?
Coding Meetup #10 - Higher-Order Functions Series - Create usernames
Coding Meetup #11 - Higher-Order Functions Series - Find the average age
Coding Meetup #12 - Higher-Order Functions Series - Find GitHub admins
Coding Meetup #13 - Higher-Order Functions Series - Is the meetup language-diverse?
Coding Meetup #14 - Higher-Order Functions Series - Order the food
Coding Meetup #15 - Higher-Order Functions Series - Find the odd names
Coding Meetup #16 - Higher-Order Functions Series - Ask for missing details
Similar Kata:
Stats:
Created | Nov 13, 2016 |
Published | Nov 13, 2016 |
Warriors Trained | 7373 |
Total Skips | 123 |
Total Code Submissions | 21649 |
Total Times Completed | 5901 |
JavaScript Completions | 4591 |
Python Completions | 1373 |
COBOL Completions | 6 |
Total Stars | 97 |
% of votes with a positive feedback rating | 96% of 989 |
Total "Very Satisfied" Votes | 922 |
Total "Somewhat Satisfied" Votes | 58 |
Total "Not Satisfied" Votes | 9 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |