{"name":"findAny","title":"findAny","type":"command","url":"https://community.bistudio.com/wiki/findAny","revid":377163,"updated":"2026-01-01T10:41:43Z","groups":["Arrays"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the zero-based index of the first element in array A that also exists in array B. If no common elements exist it returns -1.\nSimilar in functionality as find's first syntax, but the second parameter is an array of elements to find.","syntaxes":[{"syntax":"searchIn findAny toFind","params":[{"name":"searchIn","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"toFind","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the first found item"},"form":"binary","left":{"text":"searchIn"},"right":{"text":"toFind"}}],"examples":[{"code":["[0,1,2,3,4] findAny [2,4,6,8]; // returns 2"]},{"code":["[0,1,2,3,4] findAny [8,6,4,2]; // returns 2"]},{"code":["[0,1,2,3,4] findAny [5,7,9]; // returns -1"]}],"see_also":["find","findIf"]}