JavaScript Problem: Searching an Array for a Value

preview_player
Показать описание
Searching an array is a common task. In the past we have relied on indexOf and lastIndexOf. As of ES6 there are two new array methods: findIndex and find. This tutorial covers indexOf, lastIndexOf, findIndex and find.

Would you like to help keep this channel going?

For a complete list of all our tutorials:

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

I got first part but I'm struggling with material lingo and concepts. But I will watch your video until I get it. Great job

joeyalfaro
Автор

thanks a lot, this was a smooth explanation of the .find method & the arrow function

ashrafmagdy
Автор

Thank you, Sir! you really made me understand this concept. I wasted one entire day understanding by myself.

deepuchow
Автор

Good one!
But if i may ask, what about forEach method?
It can also be used to find a certain value inside of an array. Right?
It will go through each element inside of an array and return the value that we need.

andreasdev
Автор

Thanks a lot for this video. Helped a lot. 😊

sauravuppoor
Автор

Concise and to the point! Do you have a video on comparison of two arrays, finding duplicates, removing them and concatenating them? I am trying to loop over a array that splices itself (poping off duplicate value), obviously this doesnt work. Is it okay to mutate a array or create a new array due to "immutability programming styles"

rickyu
Автор

I am bit confused, you say that when using the function in the find method we will return true or false, but then the value is returned. What role does true or false play in that process?

filiplahoda
Автор

Thanks a lot, the'finIndex' is great. Like you said, 'find' stops as soon as it finds the first match and not the others so a loop is required or can you add a peace of code for it to finish searching the array?

huguolin
Автор

well done. clear explanation. purchased both of your js courses on udemy after watching this. thanks.

RyanM-gcog
Автор

Which one is the fastest way to search in an array with more than twenty thousand elements?

Michael-fllh
Автор

I love your videos. do you have angular videos of yours in udemy, if yes how much the fee, let me know, please.

rajeshnaika
Автор

How to compare in lowercase array of string using indexof

priyankasurve
Автор

JavaScript for get data in table from localStorage

miqbal