Learn Advanced Array Searching - JavaScript Array Find (In 2 Mins)

preview_player
Показать описание
The array "find" method in JavaScript lets you find the first instance in an array that satisfies a given condition. It's like a more powerful version of index of.

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript
Рекомендации по теме
Комментарии
Автор

I don't like to use a callback function inside a method that should do what his name implies. In my opinion, it would be better if we do "some_var.find("element")" and then the method returns true, false, or the index of the searched term.

_chris_
Автор

Kind of sad that Dom doesn't know how to spell "colors". LOL
Yes, I know it is the British way, but still looks funny though....

douglascounts
join shbcf.ru