Skip to content
Lists & Helpers arrayLastIndexOf

$arrayLastIndexOf — Index of the last item equal to a value (-1 when absent).

Index of the last item equal to a value (-1 when absent).

Syntax

$arrayLastIndexOf[array;value]

Parameters

  • array (text, required) — Name of the array.
  • value (text, required) — The value.

Return Value

  • string.

Usage

$arrayLastIndexOf[a;2] → "2"

Example

$sendMessage[$arrayLastIndexOf[a;2]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.