function equals(coordinate1, coordinate2) {
  let equals = true;
  for (let i = coordinate1.length - 1; i >= 0; --i) {
    if (coordinate1[i] != coordinate2[i]) {
      equals = false;
      break;
    }
  }
  return equals;
}
@param {Coordinate} coordinate1 First coordinate.
@param {Coordinate} coordinate2 Second coordinate.
@return {boolean} The two coordinates are equal.