I want to generate a new array of strings based on an existing array of objects, with each object belonging to the Employee class and having a firstName
field:
assignees: Array<Employee>;
options: string[];
I attempted to achieve this using the following approach:
this.options = this.assignees.forEach(value => value = value.firstName);
However, I encountered an error stating
type 'void' is not assignable to type 'string[]'
Can someone offer assistance?