d3.pairs(array)
For each adjacent pair of elements in the specified array, returns a new array of tuples of element i and element i - 1. For example:
d3.pairs([1, 2, 3, 4]); // returns [[1, 2], [2, 3], [3, 4]]
If the specified array has fewer than two elements, returns the empty array.
Please login to continue.