I would like to create new array with strings on the basis of existing array with objects, where Employee class includes firstName field:
assignees: Array<Employee>;
options: string[];
I tried do this in this way:
this.options = this.assignees.forEach(value => value = value.firstName);
But type 'void' is not assignable to type 'string[]'
Could someone please assist?
forEachfunction doesn't return anything. Usemapinstead