September 2017
Intermediate to advanced
216 pages
6h 8m
English
The find() method lets you to search for a specific value in a collection. It works a lot like the filter() method, with two important differences:
The find() method takes the same callback function as the filter() method. You can find list values as follows:
const myList = List.of(1, 2, 3);const myFoundListItem = myList.find(v => v === 3);const myNotFoundListItem = myList.find(v => v === 4);console.log('myFoundListItem', myFoundListItem);// -> myFoundListItem 3console.log('myNotFoundListItem', myNotFoundListItem);// -> myNotFoundListItem undefined
You can ...
Read now
Unlock full access