initial_.initial(array, [n])
Returns everything but the last entry of the array. Especially useful on the arguments object. Pass n to exclude the last n elements from the result.
1 2 | _.initial([5, 4, 3, 2, 1]); => [5, 4, 3, 2] |
initial_.initial(array, [n])
Returns everything but the last entry of the array. Especially useful on the arguments object. Pass n to exclude the last n elements from the result.
1 2 | _.initial([5, 4, 3, 2, 1]); => [5, 4, 3, 2] |
Designed by : w10schools
service@w10schools.com
Please login to continue.