Skip to content
Advertisement

get index of filtered array

how to get the index of filtered array?

for example I wanna to get the index of even number

JavaScript

Advertisement

Answer

Use .reduce:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement