Create code JavaScript

Job ID: 31928730

Budget: €8 – €30 EUR

Given an matrix of string values where:
A value is a name of a person with one of the following possible variants:

"Mr. " + <<name>>

"Mrs. " + <<name>>

"Miss " + <<name>>

"Ms." + <<name>>

<<name>> (i.e. without gender qualifying titles)

Objective is to :

- Transform the matrix so it becomes a single sequence of a tuple of type [string, <<value indicating gender or none/unknown>>]

- Based on this single sequence, it must be possible to get sequences of names people with gender male, female or none/unknown
these sequences must be of type string[] (so without the value indicating gender or none/unkown)

CONSTRAINT:

You cannot use do, while, for

You must use a functional pattern (map, filter etc)
Related categories: JavaScript Typescript