pushBack: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |1.26|= Game version ________________...")
 
(example, see aslo)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Add an element into the end of a given array. |= Description
| Insert an element to the back of the given array. This command modifies the original array. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 20: Line 20:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code></code> |= Example 1
|x1= <code>_arr = [1,2,3];
_arr [[pushBack]] 4;
[[hint]] [[str]] _arr; //[1,2,3,4]</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[set]], [[resize]], [[reverse]], [[count]], [[find]], [[in]], [[forEach]]|= See also


}}
}}

Revision as of 21:30, 15 July 2014

Hover & click on the images for description

Description

Description:
Insert an element to the back of the given array. This command modifies the original array.
Groups:
Uncategorised

Syntax

Syntax:
array pushBack element
Parameters:
array: Array
element: Anything
Return Value:
Array

Examples

Example 1:
_arr = [1,2,3]; _arr pushBack 4; hint str _arr; //[1,2,3,4]

Additional Information

See also:
setresizereversecountfindinforEach

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section