Last active
March 20, 2020 02:44
-
-
Save kluu1/0c01176cdca0c3e128aceb79fdb75097 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const employees = [ | |
| { id: 2002, name: 'Jordan Lake' }, | |
| { id: 2008, name: 'Barney Veers' }, | |
| { id: 5738, name: 'Amber Lee' }, | |
| { id: 8835, name: 'James Herring' } | |
| ]; | |
| const employeeIds = employees.map(employee => { | |
| return employee.id; | |
| }); | |
| console.log(employeeIds); // [2002, 2008, 5738, 8835] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment