first_.first(array, [n])
Alias: head, take
Returns the first element of an array. Passing n will return the first n elements of the array.
1 2 | _.first([5, 4, 3, 2, 1]); => 5 |
first_.first(array, [n])
Alias: head, take
Returns the first element of an array. Passing n will return the first n elements of the array.
1 2 | _.first([5, 4, 3, 2, 1]); => 5 |
Designed by : w10schools
service@w10schools.com
Please login to continue.