Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 613 Bytes

takeRight.md

File metadata and controls

33 lines (21 loc) · 613 Bytes

arrays.takeRight

takeRight(array, [count=1])

Take method returns a slice of array with 'count' number of elements from the end of the array

Arguments

  1. array (Array): input array
  2. [count=1] (Number): number of elements in the slice of the array

Returns

(Array): the slice of the array of length 'count'

Example

const result = arrays.some(['Amy', 'Brie', 'Cam', 'Dimitri']);
console.log(result);
> ['Amy']