8 Methods to Find, Search and Filter JavaScript Arrays

preview_player
Показать описание
Whether you want to search for an item using strict comparison or a predicate, return a list of matching items, the first item, the index or just a boolean if the item exists, these 8 methods have got you covered!

In this video, I'll cover:
0:22 - predicates
1:14 - filter
1:38 - find
1:50 - findIndex
2:06 - indexOf
2:25 - lastIndexOf
2:50 - includes
3:02 - every
3:20 - some
3:30 - Extra Credit on the predicate
4:07 - Dumpling

I also wrote an article on this topic that you can read here:
Рекомендации по теме
Комментарии
Автор

The medium post on this was also very useful, Thanks Joel

BrettCooper
Автор

I knew I was going to learn something new if it's a Joel video and there it is "PREDICATE" ....🤚🏻🤚🏻 🙏🏻

kishoreandra
Автор

What is the extension you're using for live result in the editor ????

amritpalsingh
Автор

It's hard to actually get used to all these functions. I still find myself using array.indexOf(elem) != -1 in place of includes, which stuck as a habit since 2009. Thanks for all the new stuff.

By the way, I'm sorry to say this, but your pronunciation for Indian names is way off. s̪ud̪ʰiːn̪d̪rɜ is how you're supposed to pronounce it, not as s̪uɖʰiːn̪ɖrɜ. It's n̪ɜn̪d̪äː and not n̪äːn̪ɖɜ like that. Saying just so you know. All Indian languages are phonetic, and you're supposed to read the English representations as Anglicized Phonetics.

SriHarshaChilakapati