initial

Modified on Fri, 18 Aug 2023

Description

Gets all but the last element of array.

Syntax

initial(array)

Parameters

Input ParameterTypeDescription
arrayArrayThe array to query

Return value

Type
Array<any>

Sample

ExampleResultDescription
initial([1, 2, 3])[1, 2]new array with out the last element

To view all the List functions, click here.

See Also