![]() |
VOOZH | about |
The some() method is used to check whether the given collection contains a given item or not and returns the corresponding boolean value.
Syntax:
collect(array).some(key/value)
Parameters: The collect() method takes one argument that is converted into the collection and then some() method is applied on it. The some() method holds the key/value as parameter.
Return Value: This method checks whether the given collection contains a given item or not and returns the corresponding boolean value.
Below example illustrate the some() method in collect.js:
Example 1:
Output:
true
Example 2:
Output:
true false