array initialization function

This 2019.1 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Syntax

  • float float[] [value1, value2, ...]
  • float bool[] [value1, value2, ...]
  • float string[] [value1, value2, ...]

Parameters

  1. value1, value2, ...—((float, float[] or string, string[] or bool, bool[])
    Array element values. At least one element must be specified.

Returns

An array containing all elements in the specified order.

Description

The array initialization function initializes an array by the concatenation of primitive values (float, string, bool) and/or arrays (float[], string[], bool[]).

Related

Example

Print size

const a = [1, 2, 1] // (3)[1,2,1]

const b = [0, a, 0] // (5)[0,1,2,1,0]


In this topic