Executes a callback function for each pair of elements in an array.
The callback function receives the left and right elements, their indices, and the original array.
Type Parameters
T
The type of elements in the array.
Parameters
items: T[]
The array of elements.
cb: ((a, b, i, j, items) => void)
The callback function to execute for each pair of elements.
Executes a callback function for each pair of elements in an array. The callback function receives the left and right elements, their indices, and the original array.