Create a function that returns the area of the overlap between two rectangles. The function will receive two rectangles, each with the coordinates of two of its opposite angles.
overlappingRectangles(
[{ x: 2, y: 1 }, { x: 5, y: 5 }],
[{ x: 3, y: 2 }, { x: 5, y: 7 }]
) ➞ 6
overlappingRectangles(
[{ x: 2, y: -9 }, { x: 13, y: -4 }],
[{ x: 5, y: -11 }, { x: 7, y: -2 }]
) ➞ 10
overlappingRectangles(
[{ x: -8, y: -7 }, { x: -4, y: 0 }],
[{ x: -5, y: -9 }, { x: -1, y: -2 }]
) ➞ 5


