Open this example in the interactive library
Source code
const meetings = [
[9, 10],
[11, 12],
[14, 17],
];
console.log(
meetings
.slice(1)
.map(([start], i) => [meetings[i][1], start])
.filter(([a, b]) => a < b),
);
Sample output
[ [ 10, 11 ], [ 12, 14 ] ]
