filmov
tv
indexOf vs findIndex Array methods in JavaScript
Показать описание
indexOf() vs findIndex()
This makes it a good choice to find the index in arrays of
primitive types (like string, number, or boolean).
Use this if you need the index in arrays with non-primitive types (e.g. objects) or
your find condition is more complex than just a value.
This makes it a good choice to find the index in arrays of
primitive types (like string, number, or boolean).
Use this if you need the index in arrays with non-primitive types (e.g. objects) or
your find condition is more complex than just a value.