Skip to content

$arrayLastIndexOf

$arrayLastIndexOf will return the index of the last found item of the query.

Usage

$arrayLastIndexOf[name;query]

Parameters

FieldTypeDescriptionRequired
namestringArray name.true
querystringThe element we will be queering for every element inside the array.true

Example(s)

1
client.command({
2
name: "arrayLastIndexOf",
3
code: `
4
$arrayLastIndexOf[array;akarui]
5
$createArray[array;aoi.js;akarui;akarui;documents;bot]
6
`
7
// It will return "3" as the word "akarui" is in the 3rd position of the array.
8
});