some
Executes a callback function for every single item in the array and returns true
or false
depending if any of the items in the array passes the condition. An equivalent of Array.prototype.some.
Parameters
callback Function
The function that will be executed for every item.
Returns
Boolean
—Returns true
if any of the items passes the test function condition. Otherwise, returns false
.
Example - working with some method
<script>
var arr = new kendo.data.ObservableArray([10, 15, 20, 25, 30]);
var result = arr.every((item) => {return item > 20})
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(arr)
console.log(result)
</script>