abdbgq
Last Updated: July 04, 2016
·
17
· helpermethod
Identicon

Mapping an array to it's indices

const indices = ['a', 'b', 'c', 'd'].map((_, i) => i))
Say Thanks
Respond

1 Response
Add your response

27835
Front

I think further explanation is required. Is there an example case where this would be used? I'm not sure I fully grok Javascript at all though. I mean, how is this used? Why would a programmer use this? I don't follow.

over 1 year ago ·