Skip to main content

$arrayIndexOf

Returns the index of the first occurrence of the specified element in the array.

Parameters

ParameterDescription
nameName of the array
elementValue for which the index should be returned

Example

<AoiClient>.addCommand({
name: "array",
code: `
$createArray[data;1;4;5;6;7;8;9;0]
$print[$arrayIndexOf[data;6]]
`,
});