_.initial(array)
Gets all but the last element of array
.
Since
0.1.0
Arguments
-
array
(Array): The array to query.
Returns
(Array): Returns the slice of array
.
Example
1 2 | _.initial([1, 2, 3]); // => [1, 2] |
_.initial(array)
Gets all but the last element of array
.
0.1.0
array
(Array): The array to query.(Array): Returns the slice of array
.
1 2 | _.initial([1, 2, 3]); // => [1, 2] |
Designed by : w10schools
service@w10schools.com
Please login to continue.