Array.push

Array.push

Array.push

Function

Appends one or more elements to the end of the array.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
valueNAnyNoNoneThe element to append.

Return value

TypeDescription
ArrayReturns the original array object.

Example

Notes

  • This method will modify the original array.