Array 'findIndex' method in Javascript (Array.prototype.findIndex)

preview_player
Показать описание
You can use the findIndex() method on Arrays in Javascript to search through an array and find the index of an element which meets/satisfies a testing condition that you pass in through a function.

For your reference:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

very clear and to the point! thank you!

simpsot_
Автор

I almost understand this. Here's my question, if instead of only finding Dentist, how could I write a function where I pass a text value into it and could get Dentist that way or Hair Dresser.

trevorm
Автор

How dis that isDentist function got its arguments for the parameter?

milanpoudel
Автор

Thanks!

What if you have multiple dentists and you want an array of indexes, not just the first one?

sameer
Автор

never use white theme while recording video for youtube, always use black background

mayanknagpal