Returns a new array including the first 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, take 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 first
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,takealso returns an empty array ifcountexceeds the length of the array. To return the entire array instead in this case, use slice.Example