Write a function named customArraySort
that receives 2 parameters:
an Array of objects, each with 2 properties:
id
: stringage
: numbercurrentUserId
: string
The function should return a new array that contains all elements, but sorted in a special order:
Inside every interval, the users are sorted descending by age.
users
=currentUserId
=