the difference between the filter and find methods: more info in description #coding #javascript

preview_player
Показать описание
The find() method will return only the FIRST element of an array that passes a test. Undefined will be returned when none of the elements pass the test.

The filter() method returns a new array with ALL of the elements that pass a test.
Рекомендации по теме
visit shbcf.ru