![]() |
VOOZH | about |
The isNotEmpty() method is used to check the given collection is not empty or empty and returns the corresponding boolean value. If the collection is not empty then it returns true otherwise returns false.
Syntax:
collect(array).isNotEmpty()
Parameters: The collect() method takes one argument that is converted into the collection and then isNotEmpty() method is applied on it.
Return Value: This method checks the given collection is not empty or empty and returns the corresponding boolean value.
Below example illustrate the isNotEmpty() method in collect.js:
Example 1:
Output:
false
Example 2:
Output:
false true