find
Find the first elements in an array that passes the callback testing function. An equivalent of Array.prototype.find
.
Parameters
callback Function
The testing function.
Returns
Object
—The first item that passes the search condition.
Example - working with find method
<script>
var arr = new kendo.data.ObservableArray([10, 15, 20, 25, 30]);
var result = arr.find((item) => {return item > 20})
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(arr)
console.log(result)
</script>
In this article