EPAM Systems interview question

Javascript multiple functions as arguments, grouping based on some keys.