Jump to navigation Jump to search
- Searches for an element within array for which the code evaluates to true. Returns the zero-based index on success or -1 if not found.
Code on the right side of the command is evaluated for each element of the array, processed element can be referenced in code as _x.
- array findIf code
- array: Array - array to search in
- code: Code - code defining an element to find, processed element can be referenced within the code as _x
- Return Value:
- Number - Zero-based position of the first array element for which the code evaluate to true, -1 if not found
- Example 1:
- Example 2:
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note