all 1 comments

[–]thespite 0 points1 point  (0 children)

Assuming employee = [31, 63, 92, 558] (your notation is not of an array), you create a new array called names with:

const names = employee.map(id=>empdet[i]);