Any
An any or some operation returns a Boolean indicating whether at least one element in a collection satisfies a predicate or, when none is supplied, is truthy.
Secrets of the JavaScript Ninja, Second Edition
An Array method that returns true if at least one element passes a callback test.
- How it is used
- Tests whether at least one array item satisfies a callback condition.
- How deep it goes
- Defines the callback test with a concrete example, without detailing execution mechanics.
- Examples
- Checks whether any ninja object has a weapon property.
- What you can do after
- Apply JavaScript's Array some method to test whether any item meets a condition.
Read how Secrets of the JavaScript Ninja, Second Edition explains any →
Kotlin in Action, 2E
any is a Kotlin standard-library operation that returns true when at least one element in a collection satisfies a predicate.
- How it is used
- Checks whether at least one collection or sequence element satisfies a Boolean predicate.
- How deep it goes
- Explains predicate use, logical equivalents, sibling operations, and empty-collection behavior without descending into implementation internals.
- Examples
- Uses an age predicate over people, integer comparisons, negated all and any, and an empty list.
- What you can do after
- Apply it via the Kotlin standard library to express readable existence checks over collections and sequences.
Related concepts
- equality by valuehas part · Equality by value is an equality semantics in which values are considered equal when they represent equivalent contents, regardless of object identity.
- allcontrasts with · An all operation returns a Boolean indicating whether every item in a collection satisfies a condition, or is truthy when no condition is specified.
- Objectequivalent to · java.lang.Object is the root class of Java’s reference-type hierarchy and defines methods inherited by Java reference types.
- logical ORequivalent to · Logical OR is a Boolean disjunction that evaluates to true when at least one operand or condition is true.
- listuses · A list is an ordered collection of elements arranged in a sequence.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

