function intersects(extent1, extent2) {
  return (
    extent1[0] <= extent2[2] &&
    extent1[2] >= extent2[0] &&
    extent1[1] <= extent2[3] &&
    extent1[3] >= extent2[1]
  );
}
Determine if one extent intersects another.
@param {Extent} extent1 Extent 1.
@param {Extent} extent2 Extent.
@return {boolean} The two extents intersect.
@api