Product SiteDocumentation Site

5.3. Array Constructors

The syntax for creating arrays is identical to that of JSON (do you sense a growing feeling that we are repeating ourselves? But it feels so good to say it): square brackets, comma separated values.
Example 5.7. Empty array constructors.
[],
[ 1, 2, 3, 4, 5, 6 ],
[ "foo", [ 3.14, "Go" ], { "foo" : "bar" }, true ]
Results:
[  ]
[ 1, 2, 3, 4, 5, 6 ]
[ "foo", [ 3.14, "Go" ], { "foo" : "bar" }, true ]

Square brackets are mandatory. Things can only be pushed so far.