# Function compare

- compare<T, U>(items1, items2, options): void

- Compares two arrays and invokes callbacks for items that are new, missing, or matching in the second collection relative to the first.

  #### Type Parameters

  - T
  - U

  #### Parameters

  - items1: Iterable<T, any, any>

    The first array or iterable object.

  - items2: Iterable<U, any, any>

    The second array or iterable object to compare to the first.

  - options: CompareOptions<T, U>

    Options specifying the callbacks to invoke.

  #### Returns void