Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Iterate through the array and test each element with the callback. Return true immediately when any element passes the test, short-circuiting the remaining iterations. Return false only if every element fails the predicate.
Some implements existential quantification: it answers "does at least one element satisfy this condition?" Early return on the first truthy result makes it efficient for large arrays where a match is found early.
Updated Mar 2026