Skip to main content

array.append(item)

Adds an item to the end of an array

Availability

Device + Agent

Parameters

Name Type Description
item Any Any Squirrel data type

Returns

Nothing

Description

This method adds the value passed as the method’s parameter to the end of the target array, increasing the array’s size by one item.

The appended value can be of any Squirrel data type. However, if functions and/or objects are inserted into the array, the array can no longer be serialized (see the Developer Guide ‘Serializable Squirrel’).

Programmers particularly accustomed to working with stacks may prefer to use the push() method, though in operation it is identical to append().

Example Code