aperture
Creates an array of n
-tuples of consecutive elements.
- Use
Array.prototype.slice()
andArray.prototype.map()
to create an array of appropriate length. - Populate the array with
n
-tuples of consecutive elements fromarr
. - If
n
is greater than the length ofarr
, return an empty array.