const nameList = ['John Doe', 'Jack Lock', 'Nick Load'];
const initials = nameList.map([n]) => n);
console.log(initials);
I'm attempting to display the initials of the array items, but I'm only able to retrieve the first letter of each item.
This is the current output
https://i.sstatic.net/PQ6g5.png
Desired output
['J.D', 'J.L', 'N.L']