Skip to content
Lists & Helpers arrayAt

$arrayAt — Item at an index (negative counts from the end).

Item at an index (negative counts from the end).

Syntax

$arrayAt[array;index]

Parameters

  • array (text, required) — Name of the array.
  • index (number, required) — Position.

Return Value

  • string.

Usage

$arrayAt[a;-1] → "2"

Example

$arrayLoad[a;,;3,1,2]
$sendMessage[$arrayAt[a;-1]]

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.