find object in a function javascript code example
Example 1: javascript find object in array
myArray.findIndex(x => x.id === '45');
Example 2: object find javascript
function isBigEnough(element) {
return element >= 15;
}
[12, 5, 8, 130, 44].find(isBigEnough); // 130