Go to main content

push

Push an element at the end of an array

PUSH

NAME

push - Add an item at the end of an array

SYNOPSIS

push(array, expression)

DESCRIPTION

This function is used to addan item at the end of an array. This means that if the array contains 3 elements at first, by using the function Push, the user will add a fourth element at the end of the array. This element is chosen by the user in the definition of this function.

EXAMPLES

a=[1,2,3];
push(a, 5);
a; // return [1,2,3,5]

SEE ALSO

{{ include("includes/array.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.