Array
An array-typed variable holds a plain JavaScript array. The default value you type into the Variables panel must be valid JSON array text — something that isn't valid JSON, or that parses to something other than an array, is rejected by the panel rather than silently accepted. Once accepted, it's emitted exactly as typed, with no reformatting.
Compiles to
let items = ["a", "b", "c"];
Leaving the default value empty compiles to "no initializer" for let/var (just
let items;), or "no top-level declaration at all" for a const — see the Variables
overview for what that implies.
Get Variable / Set Variable
A Get items node reads it back; a Set items node assigns a new value and continues:
Get Variable
Set Variable
Use case
- A starting collection: a list of allowed values, a seed queue, or any small in-memory collection a route needs to push to, filter, or iterate over — wire it straight into any of the array operation nodes.
Related
- Get Variable / Set Variable — the generic node reference (ports, wiring rules).
- Variables overview — declaring a variable, keywords, and cross-canvas concepts (Export, Module Variables).