Returns a new array including the last count elements. Returns an empty array if count
is not an integer or is negative. To prevent unexpected behavior from returning
a non-empty but shorter than expected array, takeLast also returns an empty
array if count exceeds the length of the array. To return the entire array
instead in this case, use slice.
Returns a new array including the last
countelements. Returns an empty array ifcountis not an integer or is negative. To prevent unexpected behavior from returning a non-empty but shorter than expected array,takeLastalso returns an empty array ifcountexceeds the length of the array. To return the entire array instead in this case, use slice.Example