From e33814cf3be28dbc6f9d442b2bdbba8e05f7383e Mon Sep 17 00:00:00 2001 From: Hugo Saracino Date: Tue, 8 Dec 2020 16:52:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Add=20a=20hint=20for=20the=20sor?= =?UTF-8?q?tBy=20step=20in=20exercise=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/exo3/exo3.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exo3/exo3.ts b/src/exo3/exo3.ts index 906da02..edc9db0 100644 --- a/src/exo3/exo3.ts +++ b/src/exo3/exo3.ts @@ -111,7 +111,10 @@ export const sortPersonsByAge: ( // COMBINE SORTING SCHEMES // /////////////////////////////////////////////////////////////////////////////// -// TBD +// Now, we want to sort the array first by age, but for people of the same age, +// we want to sort them by name. +// +// HINT: Take a look at `ReadonlyArray.sortBy` export const sortPersonsByAgeThenByName: ( person: ReadonlyArray,