Skip to content
Lists & Helpers arrayUnshift

$arrayUnshift — Adds items at the start of an array.

Adds items at the start of an array.

Syntax

$arrayUnshift[array;values]

Parameters

  • array (text, required) — Name of the array.
  • values (text, required) — Items to add.

Return Value

  • string.

Usage

$arrayUnshift[a;0]

Example

$arrayLoad[a;,;3,1,2]
$arrayUnshift[a;0]
$sendMessage[$arrayJoin[a;-]]

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.